Can't publish to IIS - Copying file failed - asp.net-mvc

Error 5 Copying file Uploads\People\bzbu0pdh.png to obj\Release\Package\PackageTmp\Uploads\People\bzbu0pdh.png failed. Could not find file 'Uploads\People\bzbu0pdh.png'. 0 0 SampleProject.Web
I get this error when I try to publish my project from Visual Studio 2013. I'm pretty sure this is an unwanted file.
I tried creating a file with the same name and putting it in Uploads\People and included that in project. It didn't help either.

Browse to that directory in Visual Studio and you'll see that VS believes there to be a file there. you can right click and exclude it from the project and VS will update the project file for you.

Related

How to solve rzc generate exited code 1 error

When i pulled code from team explorer in visual studio code . Rzc generate exited code 1 error occured. I am unable to build project.how to solve this error?
Target framework .net core 3.1
Open the Project in visual studio-> check in views folder for any files having X - red color symbol then remove that file from visual studio.
Previously you deleted the files from folder - that is the issue.
ie, Razor Engine trying to render those files, but the engine could not find the physical location of that file, that is the problem. Always delete the unwanted files using the visual studio or any project editor. That is the best practice.
I solved rzc generate exited with code 1 microsoft.net.sdk.razor.codegeneration.targets
by undoing the changes that deleted a project from the folder in file explorer instead of visual studio.
In your Project.csproj, you should have a piece of XML code like this:
<ItemGroup>
<Folder Include="Controllers\" />
<Folder Include="Views\Home\" />
<Folder Include="Views\Shared\" />
</ItemGroup>
It depends on your folder structure.
In case you are using Windows 7 and getting the 'rzc generate exited with code -2147450750' while debugging a .NET Core app, try installing the standalone package: Microsoft Update Catalog - KB4457144.
I had the exact same error message (apart from the directories) on Windows 7 with a newer VC++ distribution already present.
The package contains the KB2533623 that we want. Details of KB4457144: September 11, 2018—KB4457144 (Monthly Rollup)
After installation and a reboot, dotnet new console goes through without an error.
Dell forum source: Microsoft Windows 7 Update KB2533623 needed to install Dell Update Package (DUP)
You are using visual studio 2019 older version then you have updated to the latest version has fixed my issue.
Yes. I have delete some files manually from folder.
So i resolved that issue by deleting the unloaded files from that deleted folder as
red cross files will be still in our visual studio if we delete
them outside.

Beginner help: The system cannot find the path specified

I'm just starting to use Dart in Visual Studio code and having some problems.
I've gone into Visual Studio Code, gone to File-->Open Folder..then created a folder with another folder inside, and then selected it. Then I downloaded package-simple through the terminal.Then when I go to explorer, I see that there is already pre-made code..ie under lib, src, there is a simple_console_example.dart file.
When I try to run this file I get a bin/main.dart:1: Error: The system cannot find the path specified.
Any help is appreciated!
If you're running flutter extension in visual studio code for a sub-root directory, then debugging may yield the error whereas flutter run would work.
Solution is to open the sub-directory as folder in visual studio code.
If you're having this error for no apparent reason, try running commands below in the root directory of the project as suggested in this solution:
flutter clean & flutter run
Running
flutter clean & flutter run
from a terminal worked but it didn't fix the issue that I couldn't run a Debug session from within Visual Studio Code. The fix that did it for me was:
The solution is to delete .vscode folder inside your project
which I found here: Issue #29589 on Flutter Github Project
I have the same problem. find out that in my visual studio code at the explorer, i opened the wrong folder for my project. make sure your visual studio code is opening your folder project at the explorer nav bar on the left. File=>Open Folder=>"your project folder file.

Issue with VS 2015 Project/Solution build definition in TFS 2010 Server

I'm getting an issue with TFS 2010 Build Definition which is not copying dlls properly for project in VS 2015. Initially I had an issue like all the compiler dlls are putting together in bin folder and I'm getting application level errors. Once I moved compiler dlls (csc.exe, .config,.CodeAnalysis.dll,...) Roslyn folder inside bin folder (Project\bin\Roslyn), application working successfully. My Roslyn folder is creating outside my project root directory.
Folder structure:
......\Build\Roslyn
......\Build\_PublishedWebsite\project_folder\bin
I have created a post build command to move this Roslyn inside bin and its moved successfully. but still a copy of files under Roslyn are available in bin too and its failing my application to work properly.
Any help. Please let me know if you need more info.
As a temporary fix,
I have added post build command to remove the files and it's working successfully.
if exist "$(WebProjectOutputDir)\bin\MicrosoftCodeAnalysisdll" del /F "$(WebProjectOutputDir)\bin\MicrosoftCodeAnalysisdll"

Reinstall Microsoft Visual Studio Asp.net MVC 5 Scaffolding extension

I hade a problem with scaffolding in Asp.Net MVC 5 and Visual studio 2013
I tried to reinstall the extension "Microsoft Visual Studio Asp.net MVC 5 Scaffolding" by first uninstalled it. But I cant find any way to install it again.
I tried to repair visual studio. - no luck
I tried to uninstall visual studio and install visual studio, but the extension is still missing
Do I have to reinstall the PC or is there a quick fix?
I wanted to add to Chrille's answer.
The PendingDeletes can be found in
HKEY_USERS\<SID>\Software\Microsoft\VisualStudio\12.0Exp\ExtensionManager
And
HKEY_USERS\<SID>\Software\Microsoft\VisualStudio\12.0\ExtensionManager
And I found the AppData in my local and Roaming app data.
Here's what I did. It was a bit more involved than what everyone else was reporting. I tried doing a repair in the Control Panel, it ran for several hours and then failed. Perhaps my problems were that I installed VS2013 sp1 and then upgraded it to SP4 before I removed "Microsoft Visual Studio Asp.net MVC 5 Scaffolding."
I downloaded and installed Visual Studio Premium with Update 4 and then did a repair using that file, but the extension was still missing. I then found the AspNetWebFrameworksTools_VS12_ENU.msi in the en_visual_studio_premium_2013_with_update_4_x86_dvd_5935086.iso and did an uninstall and a reinstall, but the extension was still missing.
I extracted the packages\WPT\AspNetWebFrameworksTools_VS12_ENU.msi file from my .iso file using msiexec. In order to get the .msi file to extract successfully, I also had to place the *.cab files from \packages\WPT into the same folder I was extracting the .msi from. Once I'd extracted my msi file, I went into it's folder structure and found the Scaffolding stuff. It was in Dest\Microsoft ASP.NET\ASP.NET Web Stack 5\VS_12_COMMON7_IDE\Extensions\Microsoft\Web\Mvc\Scaffolding folder.
Once I had that, I still didn't have a .vsix file that I could install into Visual Studio. So what I did was create my own .vsix file. I did a little research on the web and created a file called [Content_Types].xml, it's literally called that. I renamed the file extension on several .vsix files that I had downloaded on my system to .zip and looked inside them to see what the contents of my [Content_Types].xml should look like, here's what I came up with:
<?xml version="1.0" encoding="utf-8"?>
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
<Default Extension="dll" ContentType="application/octet-stream" />
<Default Extension="pkgdef" ContentType="text/plain" />
<Default Extension="vsixmanifest" ContentType="text/xml" />
<Default Extension="txt" ContentType="text/plain" />
</Types>
I then zipped up [Content_Types].xml, extension.vsixmanifest, and Microsoft.AspNet.Scaffolding.Mvc.5.0.dll to a zip file called Microsoft.AspNet.Scaffolding.Mvc.5.0.zip. I then renamed that .zip file to Microsoft.AspNet.Scaffolding.Mvc.5.0.vsix. I then was able to install the extension using this .vsix file that I created.
I found that uninstall the AspNetWebFrameworksTools_VS12_ENU.msi in the vs2013 ISO. And install it.
So here's what I did...
1) I uninstalled the scaffolding through Visual Studio.
2) Deleted the registry from:
HKEY_USERS\<SID>\Software\Microsoft\VisualStudio\12.0\ExtensionManager\PendingDeletes
3) Went to Control Panel > Programs
4) Select Microsoft Visual Studio Ultimate 2013 > Hit Change
5) Choose Repair.
Pretty simple, but a little time consuming
Fixed it by deleting pendling delete in the registy + deleted AppData for Visual studio
AppData will be recreated at startup of vs
Have 7zip installed.
Download the full iso of visual studio.
extract the iso to a folder.
Go to \packages\WPT within that folder.
Run AspNetWebFrameworksTools_VS12_ENU.msi
Uninstall.
Run AspNetWebFrameworksTools_VS12_ENU.msi
Install.
That should do it.
To verify, create a new MVC project, and try to add a scaffold item. Don't verify with an existing project, because that may be a whole different problem.
I was missing the MVC controllers in scaffolding (only able to select Web API 2), then after removing MVC 5 scaffolding to reinstall I could not get it installed again.
I found downloading the .iso for VS 2013 update 4, extracting to a folder, then running AspNetWebFrameworksTools_VS12_ENU.msi to uninstall, then again to reinstall, then rebooting resolved both issues. I am now able to add controller, and I have MVC 5 controllers to choose from.
What worked for me was to remove the Registry keys, the AppData and the folder in this location C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions. After this, I repaired the VisualStudio from Programs and Features in control panel. I was desperate because even I uninstalled and re-installed again and the extension was not visible.

visual studio 2012 ,tfs project loading failed

My admin of the TFS rename the project name and when i get the latest version all other projects are loaded to my local visual studio but the project which have been renamed is not loading . I tried to delete the solution from the local mapped path and then got again latest version but still the problem is same and its give me a message that the Project file .csproj has been moved ,rename or not in you computer. I also tried to delete the .SUO file and get specific and latest version restart visual studio added the existing project to solution . I spent many days to resolve the issue but I am not able to do so , can any one help me in this Problem ,
Check the solution file when it comes our of TFS. I have had an issue similar to this, and I could see the correct files comin out of TFS into my local workspace, but the minute I loaded it it VS, all of the old code came back.
Eventually I discovered the solution file still referenced my old code, which caused it to be loaded in from the TFS profile.
See if the admin physically renamed the files in TFS but didnt change the details in the soluton and project files.

Resources