Did not find the metadata file netstandard2.0 dll - c#

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

Related

Visual Studio 2019 not creating OBJ or BIN folder

So basically I'm trying to create a simple console application. However, whenever I create one instead of seeing the usual run button I am instead greeted to a button that says attach so I read through forum after forum and I found out that I need an OBJ and a Bin folder. So I looked through my solution and found that I have no bin or obj folder created. So I tried to make a new solution however in this new solution again there is no bin or obj folder. I honestly don't know what to do anymore. Here are some images:
Make sure you are actually creating a solution in Visual Studio. The straightforward way to do that is to use File / New / Project... in the menu. Then you will likely have a dialog box, and there you need to find Console Application - C#. Then type your project and solution name - it's ok if they're the same name. Then save. That's all.
Do not use the menu to open Program.cs or other files in your solution, once your solution is created. Use the Solution Explorer, and click on the file you want to see. If you don't see the Solution Explorer, use View / Solution Explorer in the menu.
Later, when you want to reopen your solution, use File / Open / Project/Solution... in the menu, and open your solution file, whose name ends with .sln Or even easier, look in File / Recent Projects and Solutions.
You will likely want to add more source files to your projects very soon, so I'll tell you how to do that too. In the Solution Explorer, right click on the project (not the solution), and in the popup menu, point at Add and then New Item... to get a dialog, then choose Class - C#. Type the name of the file while keeping the extension .cs, and then Add it.
The process should look something like this:
It's probably likely that there is an issue with dotnet on your path variable. Go to your system variables and add C:\Program Files\dotnet\ to path. It should fix the issue if you had the same problem as me.
You may have been building a console app that can run on .NET Core and you just don't have the NuGet packages installed. Then you need to either install the appropriate packages or create a console application (.Net Framework)

Unable to start program. [VALUE].dll is not a valid Win32 application error in Visual Studio 2017

I have developed an C#, ASP.NET web application in a Windows 7 machine using Visual Studio 2012. Now i had imported the entire project into VS 2017 running on windows 10 machine, and when i try to enter the debugging mode to analyze my code it shows the following error:
I guess the project configurations are conflicting hence it throws this error.
Any suggestions??
The same error happens when Visual Studio solution has selected the wrong Startup Project. The bold project is the designated startup project.
Go to the Solution Explorer > Right click on the correct project and select "Set as StartUp Project" in the context menu.
I also got this error. I ultimately got to know that I was not selecting .sln file.
In VS, you should select .sln file and it automatically loads the complete project structrue is what I learnt.
Selecting .sln file worked for me
These errors are mostly because you are not selecting the .sln or solution file. In your solution explorer tree, double click the solution file and then build and run.
This runs contrary to a users intuition that simply opening a file and running it would work. Consider it a poor user interface. Jet Brains Rider, for instance, does not have this issue.
Change Targeting Platforms with the Configuration Manager and Build the project then try to debug it.I hope this will help you.
Don't export the project folder. upload the .sln file.
It will work.
DLLs cannot be ran/debugged directly. You have to specify host application in the
Configuration Properties>Debugging>Command and then let it load the DLL by itself.
You will most likely need to copy the DLL to the directory searchable by the host application e.g. its root or ./plugins folder.
In the Configuration Properties>Build Events>Post-Build Event>Command Line simply enter something like:
copy "$(TargetPath)" "$(HOST_APP)\plugins"
The Startup Item needs to be a .exe file. It's looking at BusinessLayer.dll because BusinessLayer is currently the Startup Project.
First, build the solution. Then, set the Solution Explorer to folder view and find the .exe in one of you project's /bin folders. Right click on it and set it to the Startup Item.
Finally, click the play button in Visual Studio top bar.
EDIT: Basically the same as Thomas' answer, but I'm pointing out that the "correct project" is the one with the .exe file. I would have commented on his answer, but I have less than 50 rep right now.

Checkout A Project With Git And Visual Studio

I recently started using Git with Visual Studio 2015 and I'm trying to modify the properties of an installer project. The issue is that it won't let me because the project isn't checked out and I don't see an option to check out the project with Git through Visual Studio. The only place I even see the mention of the words 'Check Out' is under branches and it's grayed out.
I'm having the same problem in VS2015. It seems to be an issue with the Installer Project extension. For some reason Visual Studio doesn't detect when you attempt to change the Setup Project file (with YourProject.vdproj), and doesn't automatically unlock it for you. I had the same problem with TFS, but in that case all you had to do is manually unlock the file, by right clicking on it. I've just migrated to Git, and the problem is still there, but now you can't unlock the file by right-clicking on it (since there is no explicit check-out in git).
I'm still looking into the problem, but the only solution I've come up with now, is making a quick manual edit of YourProject.vdproj in Notepad. Visual Studio WILL recognize that edit, and unlock the file for you. After that you can continue to use IDE to make changes to the Installer project.
Unfortunately, the problem comes back once you check in your changes, and try to modify the file again. You will once more have to manually edit it to force Visual Studio to unlock it for you.
EDIT: After spending a few hours on this, I finally came up with a proper fix, which I verified works on a few in-house projects. Here are the steps:
Open your solution file in notepad, and delete the following section: GlobalSection(TeamFoundationVersionControl)
Open the solution containing locked Setup Project in Visual Studio.
Go to Tools > Options > Source Control > Plug-in Selection, and pick 'None' from the dropdown.
Click Yes to the dialog that warns you the project will be closed.
Open the solution again, you will be prompted to permanently remove
source control bindings from the projects. Click Yes to that.
You can now go back to Tools > Options > Source Control > Plug-in
Selection and pick Git again.
At this point the problem is fixed, and you will be able to modify
your Setup Project without any issues.
I found that removing bindings is clearing the values of the following tags from the project files:
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
Apparently SAK stands for 'Should Already Know'.
Here is a workaround I found,
Mark the project installer in the Solution explorer, And click "Save" (not save all).
For me it did the trick.
If it's still didn't help try to reopen VS and try the method again.
Cheers!
Open a command line, go to where you need to check it out, then issue the git checkout command? http://git-scm.com/docs/git-checkout
Like Eternal21 I encountered this problem when trying to modify an Installer project, this was in a VS2013 (rather than VS2015) project though and I could not see a GlobalSection(TeamFoundationVersionControl) in the solution file. However the following steps worked;
Go to Tools > Options > Source Control > Plug-in Selection, and pick 'None' from the dropdown.
Make the change required to the Installer project
Go back to Tools > Options > Source Control > Plug-in Selection and select Git again.
(and the Solution did not ask to be closed).
You need to create a new empty repo on your Git server first, then clone it to a folder on your local computer.
After that you will be able to add your project and check it in by adding it to the local folder.
I was able to work around this problem by simply editing the vdproj file (setup project file) manually in Notepad++ (you can use any text editor), making some temporary changes into it (type a character and backspace) and saving the file. This effectively checks out the project from GIT. Now you can come back to Visual Studio and make whatever changes you want.
I was able to use dotNETs suggestions and edit the vdproj file. Simply adding a character and removing didn't work, but making an actual edit did. Doing so triggered the check out for GIT. In my case I was attempting to change one of the Detected Dependencies exclude property to false and was able to do so while editing the vdproj file. Once I saved it then reopened Visual Studio the check was displayed on my installer and the change was already applied. I was able to make additional changes while checked out.
Once finished and I checked it in, I could no longer edit and needed to manually edit the file again to check out.

Make copy a vs application project

I created a web application project and it's working fine. Now I copy this project and create the new project with the same source. This is also working fine. Now I'll try to publish the second project now I get the error:
Copying file obj\Debug\Package\PackageTmp\Site.Master to obj\Debug\Package\PackageTmp\obj\Debug\Package\PackageTmp\Site.Master failed. Could not find file 'obj\Debug\Package\PackageTmp\Site.Master'
I tried many way, but not resolved my problem. Please help me to solve this.
It looks like VS is telling you it can't find the file Site.Master. Check that it (and any others) is included in the project by:
Click the "Show all files" icon in the Solution Explorer. This will show if any files are not included in the project;
The right click on the files/folders that are greyed out (not included)
Select "Include in project".

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