Jump to content

Recommended Posts

Geschrieben

I am attempting to compile the C# bindings in a Ubuntu 16.0 environment using mono compiler version Stable 4.8.0.495/e4a3cf3.

 

Reverting to csharp-2.1.12 git tag and running the following commands:

cd ~/tf/generators/csharp
python generate_csharp_bindings.py && python generate_csharp_zip.py

 

I receive the following xbuild compile errors:

Project "/tmp/generator/csharp/source/Tinkerforge/Tinkerforge.csproj" (default target(s)):
Target PrepareForBuild:
	Configuration: Release Platform: AnyCPU
	Created directory "bin/Release/"
	Created directory "obj/Release/"
Target ResolveNuGetPackageAssets:
: error : Your project is not referencing the ".NETFramework,Version=v4.0" framework. Add a reference to ".NETFramework,Version=v4.0" in the "frameworks" section of your project.json, and then re-run NuGet restore.
Task "ResolveNuGetPackageAssets" execution -- FAILED
Done building target "ResolveNuGetPackageAssets" in project "/tmp/generator/csharp/source/Tinkerforge/Tinkerforge.csproj".-- FAILED
Done building project "/tmp/generator/csharp/source/Tinkerforge/Tinkerforge.csproj".-- FAILED

Build FAILED.
Errors:

/tmp/generator/csharp/source/Tinkerforge/Tinkerforge.csproj (default targets) ->
/usr/lib/mono/xbuild/Microsoft/NuGet/Microsoft.NuGet.targets (ResolveNuGetPackageAssets target) ->

: error : Your project is not referencing the ".NETFramework,Version=v4.0" framework. Add a reference to ".NETFramework,Version=v4.0" in the "frameworks" section of your project.json, and then re-run NuGet restore.

 0 Warning(s)
 1 Error(s)

 

I assumed the issue was with the project.json requesting invalid dependencies, though that all looks as fairly minimal and correct. Doing some research it seems that the project.lock.json file is generated anyway by the project.json file so I thought I would try simply deleting it, and it now compiles fine. The easiest way I found to remove it was to delete line 77 from generate_csharp_zip.py as well as deleting the file.

 

Is the project.lock.json actually required?

Geschrieben

Oh, I didn't notice that recent Mono picks up those project.json files as well. They are only meant for Visual Studio.

 

You can just delete them on Linux for now.

 

I'll look into a correct solution for this problem. Thanks for the report.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

×   Du hast formatierten Text eingefügt.   Formatierung jetzt entfernen

  Only 75 emoji are allowed.

×   Dein Link wurde automatisch eingebettet.   Einbetten rückgängig machen und als Link darstellen

×   Dein vorheriger Inhalt wurde wiederhergestellt.   Clear editor

×   Du kannst Bilder nicht direkt einfügen. Lade Bilder hoch oder lade sie von einer URL.

×
×
  • Neu erstellen...