We recently updated a deprecated package in one of our projects replacing it (as directed) with
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.CosmosDB" Version="4.0.0" />
This has a dependency for Microsoft.Azure.WebJobs >= 3.0.32 We also use the package Microsoft.Azure.WebJobs.Extensions.DurableTask version 2.8.1 which has a dependency on Microsoft.Azure.WebJobs >= 3.0.31 (.NetCoreApp version 3.1). The DurableTask can be updated to version 2.9.0 but this does not upgrade the Microsoft.Azure.WebJobs which is still listed as >= 3.0.31
We are getting errors & when setting up the CosmosClient consistently get the following error:
error CS1705: ... uses 'Microsoft.Azure.WebJobs.Host, Version=3.0.32.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'Microsoft.Azure.WebJobs.Host' with identity 'Microsoft.Azure.WebJobs.Host, Version=3.0.31.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
How can I force the Microsoft.Azure.WebJobs.Extensions.DurableTask package to use Microsoft.Azure.WebJobs >= 3.0.32 even though its dependency states Microsoft.Azure.WebJobs >= 3.0.31 which I believe means lowest available .31 or over.
We don't really want to undo the previous package update as that would mean using a deprecated package again.
Try installing Microsoft.Azure.WebJobs with newwer version explicitly:
dotnet add package Microsoft.Azure.WebJobs --version 3.0.33
Or by changing the .csproj
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.33" />
Related
I've switched my Visual Studio extension from old csproj format to the new SDK-style format and hoped to get everything I need with the following package references (previously I had to reference like 100 different packages in my packages.config)
<PackageReference Include="Microsoft.VisualStudio.LanguageServices" Version="3.8.0" />
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="16.0.206" />
<PackageReference Include="NuGet.VisualStudio" Version="5.8.0" />
However, while the extension builds within Visual Studio, I run into problems when building the extension with MSBuild (when restoring NuGet packages):
"C:\Path\MyExt\MyExtension.sln" (Build target) (1) ->
"C:\Path\MyExt\MyExt.Tests\MyExt.Tests.csproj" (default target) (9) ->
C:\Path\MyExt\MyExt.Tests\MyExt.Tests.csproj : error NU1603: Microsoft.CodeAnalysis.EditorFeatures.Text 3.8.0 depends on Microsoft.VisualStudio.CoreUtility (>= 16.8.39) but Microsoft.VisualStudio.CoreUtility 16.8.39 was not found. An approximate best match of Microsoft.VisualStudio.CoreUtility 16.8.239 was resolved.
C:\Path\MyExt\MyExt.Tests\MyExt.Tests.csproj : error NU1603: Microsoft.CodeAnalysis.EditorFeatures.Text 3.8.0 depends on Microsoft.VisualStudio.CoreUtility (>= 16.8.39) but Microsoft.VisualStudio.CoreUtility 16.8.39 was not found. An approximate best match of Microsoft.VisualStudio.CoreUtility 16.8.239 was resolved.
C:\Path\MyExt\MyExt.Tests\MyExt.Tests.csproj : error NU1603: Microsoft.CodeAnalysis.EditorFeatures.Text 3.8.0 depends on Microsoft.VisualStudio.Text.Data (>= 16.8.39) but Microsoft.VisualStudio.Text.Data 16.8.39 was not found. An approximate best match of Microsoft.VisualStudio.Text.Data 16.8.239 was resolved.
C:\Path\MyExt\MyExt.Tests\MyExt.Tests.csproj : error NU1603: Microsoft.CodeAnalysis.EditorFeatures.Text 3.8.0 depends on Microsoft.VisualStudio.Text.Data (>= 16.8.39) but Microsoft.VisualStudio.Text.Data 16.8.39 was not found. An approximate best match of Microsoft.VisualStudio.Text.Data 16.8.239 was resolved.
C:\Path\MyExt\MyExt.Tests\MyExt.Tests.csproj : error NU1603: Microsoft.CodeAnalysis.EditorFeatures.Text 3.8.0 depends on Microsoft.VisualStudio.Text.Logic (>= 16.8.39) but Microsoft.VisualStudio.Text.Logic 16.8.39 was not found. An approximate best match of Microsoft.VisualStudio.Text.Logic 16.8.239 was resolved.
C:\Path\MyExt\MyExt.Tests\MyExt.Tests.csproj : error NU1603: Microsoft.CodeAnalysis.EditorFeatures.Text 3.8.0 depends on Microsoft.VisualStudio.Text.Logic (>= 16.8.39) but Microsoft.VisualStudio.Text.Logic 16.8.39 was not found. An approximate best match of Microsoft.VisualStudio.Text.Logic 16.8.239 was resolved.
Indeed, the packages are not on NuGet. Is this a problem with the Microsoft.VisualStudio.SDK package? Am I doing something wrong?
I think the issue is related the Microsoft.CodeAnalysis.EditorFeatures package itself. And you should contact with the author.
It's just that the problem is magnified by the new-sdk project and the true you set.
Actually, I faced the same issue in my side with even net core console project.
You can see this:
The nuget package has dependencies are >=16.8.39.
However, Microsoft.VisualStudio.CoreUtility does not have version 16.8.39 version but has 16.8.239. This is designed by the author. And according to the mechanism of nuget, it will install the minimum version of dependencies, but the new-sdk style project cannot automatically identify the invalid version, and this warning appears. But non-sdk style projects with packages.config will automatically install the valid version of the nuget dependencies.
So this issue is the dual influence of the design issue of the nuget package and the particularity of the new-sdk style project. It's just magnified in this case.
============================================
Workaround
To solve the issue, try these:
1) First, disable TreatWarningsAsErrors node under Project Properties-->Build
2) manually install
Microsoft.VisualStudio.CoreUtility 16.8.239
Microsoft.VisualStudio.Text.Data 16.8.239
Microsoft.VisualStudio.Text.Logic 16.8.239
nuget packages additionally to update the dependencies.
3) then enable TreatWarningsAsErrors to check.
I get the following error upon application debug/launch:
System.TypeInitializationException: 'The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception.'
FileNotFoundException: Could not load file or assembly
'System.Configuration.ConfigurationManager, Version=4.0.2.0,
Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot
find the file specified.
With the following piece of code that uses DatabaeContext:
private CamelotViewsStandardContext db = new CamelotViewsStandardContext();
The project is on the .NET Core 3.0 with System.Configuration.ConfigurationManager NuGet package installed. It works on the previous version which is on the .NET Core 2.2 so no idea why it is not working on 3.0?
The code behind the reference for creating the database context is using Entity Framework, which is supposed to be supported in 3.0?
This happened to me when I upgraded a project from .NET Core 2.2 to 3.1. Unit tests would pass but the exception would be thrown when the webapp was deployed. I resolved it by adding
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0" />
<PackageReference Include="System.Management" Version="4.7.0" />
to the .csproj file for the project.
Reference: https://github.com/dotnet/runtime/issues/627
install this package in both project
Install-Package System.Configuration.ConfigurationManager -Version 4.7.0
I'm trying to install 'Xamarin.Firebase.Storage.42.1021.1' so I can upload photos to my firebase database
I'm targeting 'MonoAndroid, Version=v7.1'
However, when I try to install the package I get the following
Unable to find a version of 'Xamarin.Firebase.Common' that is compatible with 'Xamarin.Firebase.Auth 42.1024.0-beta1 constraint: Xamarin.Firebase.Common (= 42.1024.0-beta1)', 'Xamarin.Firebase.Storage 42.1021.1 constraint: Xamarin.Firebase.Common (= 42.1021.1)'.
Is there a quick fix without breaking my project?
You may checked the Dependencies of Xamarin.Firebase.Storage and Xamarin.Firebase.Auth.
According to your error message, you've installed the Xamarin.Firebase.Auth 42.1024.0-beta1 package, which needs dependency Xamarin.Firebase.Common (= 42.1024.0-beta1).
Try to downgrade your Xamarin.Firebase.Auth package to version 42.1021.1.
I'm using Xamarin Forms with Visual Studio 2015. I get this error while I'm trying to add a messaging plugin.
Severity Code Description Project File Line Suppression State
Error Unable to resolve dependencies. 'Xamarin.Android.Support.v4 23.0.1.3' is not compatible with 'Xamarin.Android.Support.Design 23.0.1.3 constraint: Xamarin.Android.Support.v4 (>= 23.0.1.3)', 'Xamarin.Forms 2.2.0.45 constraint: Xamarin.Android.Support.v4 (= 23.3.0)'. 0
I have already updated Visual Studio and Xamarin, but still get this error.
What else should I do to fix this error?
This is a dependency issue. For Xamarin.Forms 2.2.0.45, the dependencies are
Xamarin.Android.Support.v4 (= 23.3.0)
Xamarin.Android.Support.Design (= 23.3.0)
Xamarin.Android.Support.v7.AppCompat (= 23.3.0)
Xamarin.Android.Support.v7.CardView (= 23.3.0)
Xamarin.Android.Support.v7.MediaRouter (= 23.3.0)
Note version conflict between the above and the error: 'Xamarin.Android.Support.v4 23.0.1.3' is not compatible with 'Xamarin.Android.Support.Design 23.0.1.3 constraint: Xamarin.Android.Support.v4 (>= 23.0.1.3)'
You will need to install the compatible version of the messaging plugin you’d like to use. Here is a related troubleshooting guide: https://developer.xamarin.com/guides/xamarin-forms/troubleshooting/.
I setup nuget packages
Install-Package Google.Apis.Core
Install-Package Google.Apis
Install-Package Google.Apis.Auth
As it said there http://google-api-dotnet-client.blogspot.ca/
We have released a 1.9.3 version of NuGet packages only for the Core packages - that’s where the new features are. You should still use 1.9.2 version of the API specific packages (such as Drive) and only update the Core packages
Install-Package Google.Apis.Calendar.v3
When I tried to build it I'm getting error:
Assuming assembly reference 'Google.Apis, Version=1.9.2.27817, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab' matches 'Google.Apis, Version=1.9.3.19379, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab',
you may need to supply runtime policy
I added redirect script in web.config:
<dependentAssembly>
<assemblyIdentity name="Google.Apis" publicKeyToken="4b01fa6e34db77ab"/>
<bindingRedirect oldVersion="1.9.2.27817" newVersion="1.9.3.19379" />
</dependentAssembly>
but still getting the same error. I check it with spy and it appears Calendar dll wants old API.
Any idea how to fix it? (Thanks)