I am working on a project in C# and multiple times I have installed nuget packages and put the latest version but then I get errors that it can't find a completely different version number.
Here is one nuget package that I had this problem with:
Version I installed
and this is the version that is added to my project:
Version in project
I am not sure why this is happening but if anyone has had this issue how have you fixed it? The way I've looked up how to fix this was not bringing me any results. Thank you
Edit: thought id also show the error my service gets from it when starting
error message
Related
I'm currently running into an issue (on Visual Studio 2022) where the test project within my solution is referencing a few other projects in my solution; however, trying to build the test project results in errors for these project references. Even more interesting is that this test project used to be working fine.
So far I've:
Double checked the pathing of the project dll's being referenced
Removed and re-added the project references.
Editing the file, Intellisense is able to find the references, but when building the console output shows errors.
Cleaned the solution
Seen recommendations online of clearing the Temp folder and AppData\Local\Microsoft\VisualStudio\17.x\ComponentModelCache for my user account and have done so
None of this has helped. Any guidance on what to research or things to try/insight to the problem would be much appreciated!
Thank you
-Austin
EDIT 1 (7/5/2022)
Error List Image
The error seem to resolve themselves when I click on them from the Error Lists (after viewing the place in the file where the reference error is occurring, the error disappears after a few seconds, removing it from the Error List and also the removing the red squiggle underline). However, the error does not actually resolve as there are still the same reference errors when trying to Build the test project.
For example, STEP.Entities is a project in the solution that is referenced by the test project. However, the test project can't find the referred Entities project.
I realized the issue was caused by packages used in the other projects of the solution were targeting different .NET versions than the same packages within the Test project.
(Firstly, to determine this I went to Tools > Projects and Solutions > Build and Run > select MSBuild Project Build Verbosity as Diagnostic. (I believe this generates more a detailed report of the status to the Output Console when building projects)).
Specifically, a lot of these packages in my test project were targeting .NET v 4.8 as opposed to v4.7.2 being targeted by packages in the other projects, and the Test project itself and other projects targeting v4.7.2. I updated my Test project to target v4.8 and everything works/references can be found.
I've had this problem recently with a project from GitHub, my best sugestion is to try checking the version you are using and maybe select an older version of the said references.
It took me a while to get it done but it worked.
I think I worked around this with following global.json in the root of my drive:
C:\global.json
{
"sdk": {
"version": "6.0.300",
"rollForward": "latestFeature",
"allowPrerelease": false
}
}
Or there might be a global.json in your solution somewhere, with a .NET SDK version that doesn't exist...
To list all installed .NET sdks on your computer, run
dotnet --list-sdks
and pick the correct version.
I've been trying to use ZipDiff to compare two zip files. I installed ZipDiff through the NuGet Package Manager in Visual Studio which installed the necessary dependencies such "SharpZipLib" as well.
During the installation it was stated that the version of SharpZipLib has to be higher than or similar to 0.86 in order to use the latest version of ZipDiff. It was also mentioned that the SharpZipLib version which got downloaded was higher than 0.86. But when I tried to build the solution I get the following error.
Build error
Then when I checked the properties of the reference that was added, the version was "0.85..".
Properties Window
Then I reinstalled them and did it through the "Package Manager Console" but I got the same result.
Can someone tell me why this happens?
I needed to change the min version as I must implement SQL framework.
Unfortunately, after changing min version to Fall Creators Update I get multiple reference errors, all talking about dll's missing like this:
The referenced component '(...)Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\netstandard.library\2.0.2\build\netstandard2.0\ref\System.Drawing.dll' could not be found
I get 116 warnings in total. I can still build and launch app, however it makes me wonder whats wrong.
I am pretty much sure whats giving these warnings.
I recreated the app by creating new solution and project and moving all code from the previous version.
Everything went smooth until I installed this:
Microsoft.Toolkit.Uwp.UI.Controls
And the warnings appeared again.
The app works anyway, and the controls from the package I use work well too.
But whats wrong with the package? Is it not compatible with fall creators update?
Is there a mode to fix it? Or can I ignore it?
Microsoft.Toolkit.Uwp.UI.Controls giving warnings when updated project to Fall Creators Update - Visual Studio UWP
This issue should be an issue about the package Microsoft.Toolkit.Uwp.UI.Controls.
According to the error message:
The referenced component '(...)Program Files (x86)\Microsoft
SDKs\UWPNuGetPackages\netstandard.library\2.0.2\build\netstandard2.0\ref\System.Drawing.dll'
could not be found
It seems the UWP project missing the .net standard 2.0 references after installing the package Microsoft.Toolkit.Uwp.UI.Controls. So, to resolve this issue, we could add the .net standard library 2.0 package to the UWP project.
Besides, when I wanted to report this issue to the author of the package, I discovered that you have already done that. This is great. And I have found devsko provided the workaround, I post it here, so this can be beneficial to other community members reading this thread:
I just added Netstandard.Library package with NuGet Package Manager to my UWP library. That solved my problem
Certified: The referenced component could not be found - warnings in Fall Creators Update Min Target.
I am trying to open the UWP project but however because of versioning issue I am not able to load the project. It gives me following error.
However, this version is already installed and even I have tried to install it again. But even after that is again giving me the same error.
I have updated the project version in .csproj file also as below. The version which is mentioned in the screenshot is already installed.
<TargetPlatformVersion>10.0.16299.91</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.15</TargetPlatformMinVersion>
After doing all this it still gives the error as Visual Studio Update Required.
Any help on this appreciated!
Don't try to target your project to 10.0.16299.91 from your csproj, you can specific the target version to 10.0.16299.0 as Jet suggested. The build version is different from target version.
Thinking about this, if your customer is on 10.0.16299.0, then he cannot use your app? This is not reasonable. By the way, when you load your project, it will asks you to retarget your project, you can find the supported target version listed there.
I am trying to build the source for the .net connector c# in Visual Studio 2017. I've tried downloading several versions of the MySQL connector from GitHub (https://github.com/mysql/mysql-connector-net/releases), but every version has an issue, I'm not sure what I'm missing.
I tried downloading the latest version 7.0.7-m6 but this throws an error about inconsistent targeting frameworks for a UAP project. I couldn't find anything about what that means so I tried one of the previous versions, 6.10.1 and 6.10.0 but both of these have different problems.
The error I'm getting back is
Source file 'Desktop\mysql-connector-net-6.10.0\Source\MySQL.Data\X\XDevAPI\Common\ColumnTypes.cs' could not be found.
There's tonnes of these types of errors, looking at the directory, these files don't exist, yet the project is still referencing them.
I would have thought importing a project from a GitHub release would just work and a release definetely wouldn't have files references that don't exist, so what am I missing.
Isnt it possible to use the nuget for mysql?
The below 6.9.9 compiled at my VS2013
I have removed the tests and EF from projects.
mysql 6.9.9 google drive link