Skip to main content

Posts

Showing posts with the label DotNet

error : Your project does not reference ".NETFramework,Version=v4.7.2" framework

I am trying to have a solution/project that can be built using Visual Studio 2019, MonoDevelop and dotnet. Building the project using mono (msbuild project.csproj) after building using dotnet I am getting the error message below.     Build started 1/3/2021 1:41:21 AM. Project "/home/u1/gitprj/mopcua/MonoOPC/opcuac/opcuac.csproj" on node 1 (default targets). /usr/lib/mono/xbuild/Microsoft/NuGet/Microsoft.NuGet.targets(186,5): error : Your project does not reference ".NETFramework,Version=v4.7.2" framework. Add a reference to ".NETFramework,Version=v4.7.2" in th$  "TargetFrameworks" property of your project file and then re-run NuGet restore. [/home/u1/gitprj/mopcua/MonoOPC/opcuac/opcuac.csproj] Done Building Project "/home/u1/gitprj/mopcua/MonoOPC/opcuac/opcuac.csproj" (default targets) -- FAILED. Build FAILED. "/home/u1/gitprj/mopcua/MonoOPC/opcuac/opcuac.csproj" (default target) (1) -> (ResolveNuGetPackageAssets target) -&

DotNet - Manage solution file

Create new solution, the name will be derived from the containing folder - in this case it will be called tmp.sln u1@m1:~/tmp$ dotnet new sln Create new solution with the given name, in this case it is called test.sln u1@m1:~/tmp$ dotnet new sln --name test Add project myprj to test.sln u1@m1:~/tmp$ dotnet sln test.sln add myprj/myprj.csproj