Hi there I need to upgrade some legacy software using NLog 2.1 to a later NLog release in order to leverage some of the new config functionality. What is the most stable release out in the wild?
VS Version is 2013
.Net Version is 4.5
Related
I am running the same project built by Cake and MSBuild on various platforms (Windows, Linux, Mac) targeting .NET Core 3.1. Everything goes well except on Mac where I'm getting NETSDK1045 error as follows:
Project "MyProject.csproj" on node 1 (Build target(s)).
/usr/local/share/dotnet/sdk/3.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(127,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.1. Either target .NET Core 3.0 or lower, or use a version of the .NET SDK that supports .NET Core 3.1.
On Mac, where the problem exists, I'm using latest version of Mono 6.12.0.122 which includes MSBuild 16.6.0.
.NET Core 3.1 is installed. I don't have any override or global.json. Here is the list of all installed SDKs:
dotnet --list-sdks
2.1.802 [/usr/local/share/dotnet/sdk]
2.2.402 [/usr/local/share/dotnet/sdk]
3.0.100 [/usr/local/share/dotnet/sdk]
3.1.416 [/usr/local/share/dotnet/sdk]
3.1.417 [/usr/local/share/dotnet/sdk]
5.0.406 [/usr/local/share/dotnet/sdk]
6.0.201 [/usr/local/share/dotnet/sdk]
Here is the information about the runtime environment from the dotnet command:
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.14
OS Platform: Darwin
RID: osx.10.14-x64
Base Path: /usr/local/share/dotnet/sdk/6.0.201/
Why does the error NETSDK1045 happens in spite of .NET Core 3.1 and even later versions are installed? And why does it happen on Mac only?
There is a common problem that and old version of MSBuild does not see the new version of .NET Core SDK.
On Mac, the problem is in MSBuild 16.6.0, which is shipped with the latest stable version of Mono (6.12.0.122).
This version of MSBuild was released earlier than the .NET Core 3.1.416 SDK. Therefore, MSBuild cannot find that version of .NET Core, but was looking for an older version that was supported by MSBuild at the time of its release. It finds .NET Core 3.0, which would not work for 3.1 projects, so that's the cause of the error. Paradoxically, if no earlier version of SDK than 3.1.416 is installed, then MSBuild was able to find it. So, there are two solutions: (1) uninstall all SDK versions earlier than 3.1.416, or (2) update MSBuild.
I installed Mono's "Preview" version 6.12.0.174, which came with the updated MSBuild - 16.10.1, so that version was able to successfully find the .NET Core 3.1.416 SDK, even though earlier versions were installed. Therefore, solution nr. 2 (from those described above) worked in my case.
The same problem existed in Microsoft Visual Studio for Mac but was fixed by Microsoft recently. The issue is not related to Cake Build.
On Windows, there may be an error that MS Build shipped with Visual Studio 2017 does not see .NET Core 3.1 SDK. If you take a newer MS Build, i.e., the one that is shipped with Visual Studio 2019, the problem will be resolved.
Have no projects yet, just have down level Visual Studio (2017). No code/projects to upgrade yet. What are the steps to upgrade? Where can the 3.x core be downloaded? Going to write C# (and probably asp.net with javascript,html,css)
I just installed VS2017 v15.7, but am having trouble running a Core 1.x Project with it. It keeps asking for 1.0.4. Does this version of VS17 support running 1.x projects without migration to 2.x ? If it can run 1.x what am i missing ?
Yes, VS 2017 will run/build .NET Core 1.x versions. You may need to install the specific SDK for your version however.
A list of versions can be found on GitHub
I'm running VS 2017 v15.4.4.
When I create a new project VS always defaults to using Framework v4.6.1, even though I have version 4.7 installed. I always have to manually change to version 4.7.
Is there any way to make VS always select version 4.7 for new projects (or even better yet, always use the most recent version of the .NET Framework available on my machine)?
Can i open a core 2.0 project in Visual Studio 2017?
I've installed the latest dotnet-core (2.0.0-preview2-005840) and created a core 2.0 console-app.
mkdir dn2cli
cd dn2cli
dotnet new console
dotnet restore
Open console.csproj in Visual Studio 2017 with "open project"
Clean and Build Solutions
i get several erros
amongs others:
Unable to resolve 'Microsoft.NETCore.App (>= 2.0.0)' for '.NETCoreApp,Version=v2.0'.
So. Is it just not supported at the moment or am i missing something?
c:\Temp>dotnet --info
.NET Command Line Tools (2.0.0-preview2-005840)
Product Information: Version: 2.0.0-preview2-005840
Commit SHA-1 hash: 8f2fcef544
Runtime Environment: OS Name: Windows OS Version: 10.0.14393
OS Platform: Windows RID: win10-x86 Base Path: C:\Program
Files (x86)\dotnet\sdk\2.0.0-preview2-005840\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0-preview1-002061-00 Build :
2b70ec9c3b014af0c2a5f45de0e5b73a1ae51c09
Update:
There is now a VS 2017 15.3 preview that resolves this issue. Starting with VS 15.3, Visual Studio carries an MSBuild SDK resolver that determines which version of the CLI SDK a project would use (e.g. if a global.json sets the version) and uses it's MSBuild targets so new previews are picked up by VS.
Original:
You can modify your environment to get VS 2017 support for the unreleased 2.0 tooling by setting the MSBuildSdksPath as described in https://github.com/aspnet/Announcements/issues/231 so that VS picks up the build logic from the CLI.
The Visual Studio .NET Core tools were just released in March, yet the 2.0 preview you are using was released in April.
https://blogs.msdn.microsoft.com/dotnet/2017/03/07/announcing-net-core-tools-1-0/
You'll need to wait for an update to the .NET Core Tools before you can use Visual Studio with .NET Core 2.0
Visual Studio 2017 Version 15.3 Released and .NET Core 2.0 also Released with nuget v4.3 and the problem is resolved completely.
you can review all fixes Release notes
Landed on this today (April 2019) and it appears that now there is a version of .NET Core Tools SDK for VS 2017. Here's how you get to it:
1. browse to http://dot.net
2. Under .NET Core 2.2, look for "Download .NET Core SDK (Compatible with Visual Studio 2017"
3. Visual studio 2017 (I have version 15.9.11) should now list .NET Core 2.2 as a target framework