I am using Visual Studio for Mac version 8.5.4 (build 12) and I used NuGet to install Nunit package. I can create a Project NUnit but when I attempt to reference my project I want to test I can't choose my project because it says the .Net target framework is incompatible.
When I added the NUnit project it asked me to pick the target framework and only gave me the option of 2.0, 3.0 and 3.1. Even when I change my project down to 3.1 it still says it's incompatible.
How do you setup Visual Studio for Mac and NUnit
Edit: .Net Standard
Edit 2: I was WRONG. I was using .Net Core and .Net standard together and that was the problem. Thank you everyone.
I was using .Net Core and .Net Standard when I wanted to use .Net Standard for everything.
Related
Having configured a Setup project for my .NET 4.7.2 codebase the Detected Dependencies shows up with a netstandard.dll.
Is there anyway to tell where this might be coming from?
Again it's just an entire 4.7.2 based code with that target Framework chosen.
The Prerequisites Page has the 4.7.2 chosen and the Launch condition has 4.7.2.
What could be causing the netstandard.dll to be included in the project output?
What could be causing the netstandard.dll to be included in the
project output?
First, thanks to magicandre1981 for all his help.
You have referenced a net standard nuget packages in your Net Framework 4.7.2 project. And because of the special nature of the package, it needs to refer to netstandard.dll as a runtime environment.
Although Net Frameowork 4.7.2 optimizes the build output file, so netstandard.dll cannot be shown in the project outputpath, but in fact the project will still use it at runtime.
But for the setup project, there is no such feature. Using the netstandard nuget package, all references will be displayed in Detected Dependencies including netstandard.dll.
In addition, Net Standard 2.0 is compatible with Net Frameowork 4.7.2, and you can refer to this document.
My solution is developed in .net framework 4.6.2 then how to upgrade in .net framework 4.7, please suggest me some references.
Thank You
I was facing the same issue because I was trying to install a nuget package which requires the 4.6.1 version at least (Mine was 4.5.2), so I right clicked to the project and selected the properties option and change the Target Framework as shown in the image and that was enough! Keep in mind that you have to install previously the Net. Framework you are trying to upgrade.
As per this document from Microsoft:
https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/
If you created your app using an earlier version of the .NET Framework, you can generally upgrade it to the .NET Framework 4.5 and its point releases (4.5.1 and 4.5.2), the .NET Framework 4.6 and its point releases (4.6.1 and 4.6.2), or the .NET Framework 4.7 and its point releases (4.7.1 and 4.7.2) easily. Open your project in Visual Studio. If your project was created in an earlier version of Visual Studio, the Project Compatibility dialog box automatically opens.
You should review the above document to better understand how to migrate your .NET version as required.
For me, the migration guide was not helpful. I needed to:
Open my solution
Right click on my project and choose "Properties"
Change the "Target Framework" to the desired choice of ".NET
Framework 4.7.2"
1.Open Solution
2.Right click on my project
3.Choose "Properties" and Change the "Target Framework" to the desired choice of ". NET Framework 4.7. 2"
It will work
So Unity 2018 should support .Net Framework libraries above 4.6 (visit https://blogs.unity3d.com/2018/03/28/updated-scripting-runtime-in-unity-2018-1-what-does-the-future-hold/).
I really need the .Net Framework 4.7.1 support for my project, but it doesn't works. The Scripting Runtime Version and Api Compatibility Level in the Unity Player Settings are setted to .NET 4.x. If i open the C-Sharp Project with Visual Studio 2017, i can install packages with NuGet, that needs the .Net Framework 4.7.1. After the installation the namespaces are available in C#, but if i go back to the Unity Editor, there are already errors in the console, that the namespace of the just installed package could not be found.
I have also tried to overwrite the in the .csproj, but after i open the Project in Unity, it just overwrites it again back to 4.6. The whole compatibility stuff has already worked for me in the 2018.1b, but then i installed the stable version 2018.1.0f2 and now it works neither with the stable nor the beta-version. I also can't find a good guide that explains it, how to use / setup the .Net Framework 4.7.1 support in Unity.
I'd like to know if there is a way to automatically deploy NuGet package.
I tried many extensions but not working for VS 2017.
I do know that there is a packager as new VS 2017 feature. But there is no package tab in my project (.NET Library) properties.
If you want the integrated package management for .NET Framework Libraries (not .NET Standard or .NET Core), you can create a .NET Standard Library and edit the csproj file by replacing
<TargetFramework>netstandard1.4</TargetFramework>
with
<TargetFramework>net461</TargetFramework>
There is no built-in template yet for this library type and some designers (win forms, xaml, ..) will not be available but this unlocks all integrated packaging features.
Just installed Xamarin Studio 5.8.2 (build 7). Already have .NET Framework 4.5.1 installed (due to VS2010 and VS2013 installed). Also installed gtk sharp 2.12.25. Upon any newly created project, I get
Error while trying to load the project. Project does not support framework .NETFramework,Version=v4.5.
It is the latest version. I downloaded today, and got an update a few hours later for gtk sharp and XStudio.
You can try editing the .vbproj or .csproj files to change the TargetFramework from 4.5 to 4.0
https://forums.xamarin.com/discussion/28329/error-while-trying-to-load-empty-vb-net-project