Project reference problem - c#

My project has some references. One of them has no path. I can't view it in object browser. When i want to remove it, my project closed.
I can't remove or change this reference. What can i do?
Thanks in advance.

Edit your project file with notepad and check the problem. (.csproj in case of C# project)

Visual Studio has a specific editor for project files, if you can open the solution which contains your project then if the project icon is grayed out just right click on it and select edit, you will have the project file opened in the text editor with xml schema validation and intellisense.

Related

why is Intellisense not working in my VS Code?

I am working on vs code. When I open any folder the IntelliSense is not working when I hover the mouse over any text. It was working before but now I don't know why it's not working. Kindly help...
Solution 1 :
Ctrl+Shift+P
Write "OmniSharp: Select Project" and press Enter.
Choose the solution workspace entry.
Then enable the C# extension for "OmniSharp : Project"
Solution 2 :
Selecting a project.json-file is opening a DNX-project and VSCode will load that project plus the referenced projects.
Selecting a *.sln-file is opening a MSBuild-project. It will load the referenced *.csproj-projects and sibling or descendant project.json-files but no other project files that are referenced from the solution file.
Selecting a folder will make VSCode scan for *.sln and project.json files and VSCode will attempt to load them all.
More info see: https://github.com/OmniSharp/omnisharp-vscode/issues/1889
Solution 3:
Download C# v1.24.0 extension can fix the IntelliSense for you
Solution 4:
For bootstrap and HTML IntelliSense, add the following extensions:
HTML HTML CSS Support
IntelliSense for CSS class names in HTML
NOTE :
All solutions need to close your VS and reopen it again.
For me solution 2 worked.
C# IntelliSense did not work with C# Extension v1.25.0.
Solution involved:
Download the old version of C# Extension 1.24.4 vsix
Install vsix manually to VS Code:
Open VS Code.
Open the “Extensions” sidebar (you can use
“Ctrl+Shift+X”).
Click on the ellipsis icon in the top right corner
of the menu.
Select “Install from VSIX…” VS Code will open a
document browser.
VS Code will now begin the installation
process of the extension.
This happened to me on 2 separate machines

Did not find the metadata file netstandard2.0 dll

What does it mean that visual studio did not find the metadata file netstandard2.0 dll? This file should will be on the bin folder so it should be automaticly created by xamarin by compiling the code.
Also it waring the depencences. Why is it? How could I solve this?
Please follow the steps below to check if it is helpful to you.
Right click on the solution and click Properties.
Click Configuration on the left.
Make sure the check box under "Build" for the project is checked. If check then uncheck and check again and save the settings.
Clean the solution by right clicking on the project solution and rebuild the project again.
Make sure you don't have any other error messages in your project and if you do, fix those first.
I have got this solution from this link Click here
if this solution does not work for you please follow the steps below
1 - Close the solution
2 - Delete obj, bin folder for PCL, android, ios project
3 - Open solution and build

ASP.NET project reference not found...at all?

Above are the problems I am having right now, and I can't contact the old programmer. The AjaxToolkit is referencing to him and I have no idea where to change that reference. Or where to get that exact part of the Toolkit that it's looking for.
TL;DR:
Check the link.
Where do I change this reference?
Where do I find AjaxControlToolkit-Framework3.5SP1\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs?
You can change the path of your references in the .csproj file
PS : To open up your csproj Right click on your project from your IDE > Open Folder In Windows explorer > You can find a file with csproj extension > Edit with notepad

Is there a built-in way to access a project's csproj file data?

Or maybe access it's data via reflection somehow ?
Thanks
EDIT: I'd like to know if there's a way to do it without reading it as an XML.
Like a ms library that supports it, so it'll work for any kind of project and any kind of vs version (2005, 2008, 2010 ... ).
The *.csproj file is really just an XML file. You can open it just like any other XML file and treat it as such as well. Realize that any changes made to it, though, will require reloading the project.
Also, remember, there is no *.csproj file once the application is compiled/deployed.
Yes, you can open it in a text editor, or from Visual Studio
Right click on a project
Unload Project
Right click on the unloaded project
Edit project
Right clicking the project and selecting the properties option gives you a GUI to change some of the settings in the project file. Also, when you right click a file and change it's properties it causes a change in the project file. If you want to do anything very serious, like add custom build steps, you have to do it by hand in a text editor like notepad++. It's just an XML file. If you're familiar with MSBuild the proj file has many similarities to a build script for MSBuild.

Cannot Edit or Add Path to Reference File in Visual Studio 2010

Cannot Edit or Add Path to Reference File
, I cannot edit or add a path to a referece file. I have inherited a project at work. When I open the project and go to the references scetion in the Visual Studio 2010 IDE there are some little yellow warning signs showing that there is something amiss with the reference listed there.
But when I click on the item and look at the missing path, I find that the name "Path" is in grey suggesting that I cannot edit it and, sure enough, I cannot add the path name to the adjoining field. What causes this? I have the solution file and the project file checked out in edit mode.
When I open the project file, the error list also gives the warnings for each missing reference:
"The reference component '(the file name)' cound not be found"
Well, I know where they are but editing the path to point there is the problem.
I think in this situation you've got 2 choices:
Remove the broken references and re-add them to the project - this is easy to do if you don't have too many broken references.
Right click on the project file in Solution Explorer and select 'Edit Project File' and manually fix the reference hint paths (the project file is XML). Save, and right-click the project file in Solution Explorer again and select 'Reload Project'.
Editing the project file by hand found the problem.
THe project file is an xml file.
It did not take long to find a reference in the path that was wrong.
I had the same issue, none of the above solution worked. Only thing I was supposed to do was right click on my sln file, click on "Enable nuget package restore option", save it, close the visual studio. Open it again, clean and rebuild the solution. Visual studio rebuilt the solution successfully.
I also had a problem with adding references
i would add a reference and the path is always empty
what eventually helped was
Right click project > unload project
Right click again > Edit project file
in project file scroll to bottom and remove group named:
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
....
</Target>
reload project again and build

Categories

Resources