I have an Identity Server 3 Project where I need to install a couple of custom Nuget Packages, that comes from a private Nuget Package repository in my company. This Nuget is installed and running in many other web projects so it is most likely not the problem.
When I install the package on Identity Server Project, logs say everything was fine and the package was successfully installed. It is listed on Project References. But when I try to access it anywhere on Identity Server Project, it just isn't accessible. I can't set up an using reference, neither call any methods by using it's full namespace (InstalledNuget.Services.Example). Visual Studio's intellisense returns "The type or namespace name does not exist in namespace 'company' (are you missing an assembly reference?)".
While investigating the issue, I found out that it is listed on Project References, but not on Object Browser.
I tried:
reinstalling the package;
restarting Visual Studio;
Deleting the packages folder and let the program restore then again;
I have been to several posts here and other websites but did not find a problem matches this one. Any hints?
The error was some visual bug on Visual Studio. I accidentally clicked on run, and it run successfully, with errors still on the screen. It ignored then completely.
Then I manually removed "bin" and "obj" folders and everything returned to normal.
Related
Visual Studio Community 2019. I sometimes work from home on the weekend (I know, I know!). When I do I commit my work and then sync from home. My project uses references to an installed program and I have an older version of that program installed at home. My project is run as admin and registers com as interop.
I did some work at home and committed. I synced at work and now I am getting:
Could not load file or assembly 'SolidWorks.Interop.swpublished,
Version=28.1.0.74, Culture=neutral, PublicKeyToken=89a97bdc5284e6d8'
or one of its dependencies. The system cannot find the file
specified. DispensingAddIn C:\Users\erics\source\repos\TestingEFClassLibrary\TestingEFClassLibrary\RegAsm
I have removed all references to Solidworks and re-added them but that doesn't seem to help. I have also looked at this page. None of those seem to fit my issue.I checked in the csproj file and the path to the references are correct but no version is called out.
Questions:
How do I resolve this issue to press on today?
How to work in both places when the environment is different on two different machines?
I found the solution in my case. One of my NuGet packages also referenced SolidWorks.Interop.swpublished. I found this my using "Optimize References". I uninstalled the Nuget package and reinstalled it again. That resolved the issue.
I created my first C# application recently, and since buying a new computer I cannot get the application to start.
I am receiving 7 of the following errors Error NU1101 Unable to find package Microsoft.VisualStudio.Web.CodeGeneration.Design. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages clesson C:\Users\porkh\Desktop\WERK\Personal\c-lesson\clesson\clesson\clesson.csproj
Each with different packages missing.
Since this was a missing dependencies message I reinstalled visual studio 2019 with C# .net support again, yet I am running into the same error.
On StackOverFlow I read that I need to check my NuGet packages,
Here it shows every package that is "missing" in the error messages as installed.
I have also tried running dotnet run and dotnet restore but I get the same error messages.
I am extremely new to C# so sorry if I have missed the solution in other's answers. Any help you can give me I'd appreciate it.
A link to all of my project files here
In the image it says
Not available in this source
and the package source is set to Offline Packages. My best guess is, switching to an official NuGet Feed in the drop down to the upper right, will solve your problem. You also want to check, if the Nuget source is available (it should).
If not, click the Cog icon, and add it there with the name "Nuget" and the Url https://api.nuget.org/v3/index.json
when restoring a locally created nuget package I receive the following error:
Failed to add reference to 'Microsoft.Data.SqlClient.SNI.x64'.
Please make sure that the file is accessible, and that it is a valid assembly or COM component
When I look at the nuget build I see the following
click to enlarge
The highlighted yellow "missing" dlls in the screenshot above do actually exist in the project.
I am using Visual Studio 2017 professional
Thanks for any help
Mark
Nuget package update - Microsoft.Data.SqlClient.SNI.x64
Please try the following steps:
1) close VS Instance, delete nuget.config file under C:\Users\xxx(current use account)\AppData\Roaming\NuGet.
2) delete .vs hidden folder under your solution folder, bin and obj folder then restart your project to test again.
3) Please try to create a new empty project in VS2019 and test whether you can install the package Microsoft.Data.SqlClient.
If you cannot install it, you should note that whether your VS or OS has broken. If the new project has no error, the issue is your project itself. You can try the above steps to troubleshoot the issue.
If the issue still persists in the new project,
You can try to repair VS or update VS to the latest version.
Also, try to update OS or use the System File Checker tool to repair missing or corrupted system files.
Besides, try another PC to test whether the issue persists.
Microsoft.Data.SqlClient.SNI.X64 or X32 files need to be removed from release folder before creating package.
Microsoft.Data.SqlClient.SNI.X64 will be added automatically while adding Microsoft.Data.SqlClient.
So, remove the dll before creating the package and then try installing it.
I know this question is exactly the same as this but even after following it's solution i am still stuck up with this error
error CS0234: The type or namespace name 'Reporting' does not exist in
the namespace 'Microsoft' (are you missing an assembly reference?)
Things i did to install Report Viewer
I followed the below link to install the report viewer
Download and Install Report Viewer For Visual Studio 2017 - YouTube
(this link shows how to install it from NuGet Manager and Extensions and update)
and i was able to make a Report as well as add Report Viewer to my Windows Form
but i am getting the above mentioned error on building the program
Solutions i have tried
I tried re-adding the reference by right-clicking on References folder in my project and then selecting Add Reference. and then adding Assemblies > Extensions > Microsoft.ReportViewer to the references.
I tried unloading the project and changing it's .csproj file and manually mention the version
Also cleaned the whole solution and manually removed any other remaining files in the output directory and rebuilding it.
BUT
when i try to see the designer of the form in which ReportViewer has been inserted then the Tooltip says that it is recognizing the namespace
Now, I am left with no solutions now. Any piece of advice will be appreciated.
Maybe you should try to use NuGet Package for install Reporting Service on your Winform application.
I use this NuGet and it's working fine for me.
Microsoft.ReportingServices.ReportViewerControl.Winforms
The answer was to change my .Net Framework from 4.0 Client Framework to 4.0. I guess it needs full features of that framework rather than the client version for it.
I've been browsing around StackOverflow exploring possible solutions to my issue. For some reason TeamCity is unable to find 'Microsoft.Web.Infrastructure' but I have installed all the required .Net packages. However, I've ran all the tests locally and building the project within Visual Studio returns a successful build.
This is the error which I am experiencing:
App_Start\NinjectWebCommon.cs(9, 40): error CS0234: The type or namespace name 'DynamicModuleHelper' does not exist in the namespace 'Microsoft.Web.Infrastructure' (are you missing an assembly reference?)
Solutions I have tried
Within Visual Studio I was instructed by one StackOverflow thread to set the reference 'Microsoft.Web.Infrastructure' option 'Copy Local' to true. This returned the same result of the error above.
I've deleted all references of 'Microsoft.Web.Infrastructure' and performed a fresh install of this package, I'd had also reinstalled Ninject as well. I didn't specify a particular version. Again, building locally was successful remotely not so much - same error occurred.
Has anyone encountered such issue before? I had also done a fresh clone of the GIT Repository, restored all the NuGet Packages (Which TeamCity does as well) and it built completely fine.
After asking this question I'd continued my investigation. While my continuous integration server is running multiple windows virtual machines, and since TeamCity load balances the builds across these virtual machines some of their configurations were out of sync with the rest. Some of the team code purely in C++, so the version of Microsoft Visual Studio which was installed (Visual Studio Professional 2013) was the incorrect version for my C# project. After attempting to open the project with Visual Studio on one of the selected VM's, I found that Visual Studio didn't understand the csproj file extension.
I installed Visual Studio 2013 Ultimate - this is version I use on my workstation - and thankfully it complied. sometimes within my project, when I request a build it would use older files as TeamCity would cache the files locally. I found setting the to 'clean and re-download' within the VCS options also remedied this issue.