Azure / azure-service-bus-dotnet

☁️ .NET Standard client library for Azure Service Bus
https://azure.microsoft.com/services/service-bus
Other
235 stars 120 forks source link

MSB3644 The reference assemblies for framework ".NETCore,Version=v5.0" #301

Closed SimonCropp closed 7 years ago

SimonCropp commented 7 years ago

I get a compile error because of <TargetFrameworkVersion>v5.0</TargetFrameworkVersion> https://github.com/Azure/azure-service-bus-dotnet/commit/a21a7b6598525f6b690736541985d1b82f3c2767#diff-8a6ee8acd956baca004497033464d66eR35

nemakam commented 7 years ago

What is the exact error message that you get? We have a perfectly running build and a UWP sample which works pretty well with the current client

nemakam commented 7 years ago

And you get this error message while building the client code or while using Microsoft.Azure.ServiceBus nuget package in your application?

SimonCropp commented 7 years ago

when building this repo

Severity    Code    Description Project File    Line    Suppression State
Error   MSB3644 The reference assemblies for framework ".NETCore,Version=v5.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.   Microsoft.Azure.ServiceBus  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets  1122    
Restoring NuGet packages...
To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.'
1>------ Rebuild All started: Project: Microsoft.Azure.ServiceBus, Configuration: Debug Any CPU ------
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1122,5): error MSB3644: The reference assemblies for framework ".NETCore,Version=v5.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
1>Done building project "Microsoft.Azure.ServiceBus.csproj" -- FAILED.
2>------ Rebuild All started: Project: Microsoft.Azure.ServiceBus.UnitTests, Configuration: Debug Any CPU ------
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========
nemakam commented 7 years ago

MSB3644 The reference assemblies for framework ".NETCore,Version=v5.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version

Looks like you don't have the latest dotnet core SDK installed. Could you update your SDK version and try again.

SimonCropp commented 7 years ago

can u give me a url to .NETCore,Version=v5.0 ?

SimonCropp commented 7 years ago

and this is what i have installed now image

nemakam commented 7 years ago

@SimonCropp , not sure why you are facing this. Might be a dotnet error that you are facing? This seems to compile just fine in every other machine that we use (and lot of other contributers + public build servers etc). One other thing that I notice is that we take dependency on Microsoft.NETCore.UniversalWindowsPlatform v5.2.3 which internally takes dependency on Microsoft.NETCore v5.0.2. This might be the framework version it is referring to. See if your nuget package restore works fine. Maybe just create a standalone project and try to take a dependency on Microsoft.NETCore.UniversalWindowsPlatform nuget.

nemakam commented 7 years ago

@SimonCropp do you plan to use this for uap app or regular dotnetcore app?

SimonCropp commented 7 years ago

given netstandard 1.3 supports UAP OOTB no extra csproj config should required https://github.com/Azure/azure-service-bus-dotnet/pull/310/commits/15865e7c2d45ac1e9ea4172dfbef312a89bca3c1