WinRT: cannot release build my application - c#

In my application I have 3 WinRT projects which I want to deploy. I want to deploy 1 of them; M.Survey.Windows which is dependent on the other 2.
I can build the projects OK, but when I try to build and deploy I run into difficulties.
I click on store -> Create App Packages, select No to upload to the Windows Store, click next and then Create. This does a build which fails, see below. How do I fix this?
The error messages say;
Error 1 The text associated with this error code could not be found.
Cannot find a Resource with the Name/Key BlackSmallHeaderStyle ...\M.Survey.Windows\UserControls\DimUserControl.xaml 137 25
Error 2 Unable to remove directory "obj\x86\Release\PackageLayout\". The process cannot access the file 'Microsoft.Xaml.Interactions.dll' because it is being used by another process.

Killing XDesProc.exe also worked for me.
XDesProc.exe is the Visual Studio XAML Designer tool.

Related

Visual Studio Web Apps Publish fails - no errors

I have several ASP.Net web form apps in a Visual Studio project. In one of the apps, I was working to add a test page for some additional features we wanted to test before adding to our main pages. Afterwards however, I was trying to publish to our server, but keep getting a message box saying: "The publish has failed due to one or more errors.".
Build succeeded Image
Publish Failed Image
I checked the errors, but none are given. The build was successful and other then a few un-used references, there are no other indicators on what the issue exactly is. We have a few other projects that normally allow for publishing without issues. So I don't believe the issue is from Visual Studio, but I am not completely sure. I'm using Visual Studio 2015 version 14.0.24720.00
Figured it out!
There is a Thumbs.db file that was auto-generated in the images folder. I decided to go through the output window line by line to see if I could identify where the publish was failing at. I noticed a line that said the /Images/Thumbs.db file could not be published and that access was denied.
Doing some more online investigating, I found some other questions along the same line as the premise for this one. Specifically the question here was most helpful. Tammy Spencer's (#user:973679) answer to try and delete the file was what made the publish succeed. So thank you Tammy.
In addition, the Thumbs.db file wouldn't let me delete it at first. But after doing some more searching, I found this YouTube video that made the file deletable.

Web Application publishing failed - Visual Studio - C# - ASP.NET

I have a web application developed in ASP.NET that compiles correctly, however it gives the following error when trying to publish it.
Copying file obj\Debug\CoreCompileInputs.cache to obj\Release\AspnetCompileMerge\Source\obj\Debug\CoreCompileInputs.cache failed. Could not find file 'obj\Debug\CoreCompileInputs.cache'.
Screenshot 1
We use three computers to publish this application (generate the Web Deploy Package). In one of these PCs the problem seems to be solved by following this steps:
Close all Visual Studio tabs
Clean Solution
Close Visual Studio
Open Visual Studio
Recompile
Publish
But on the other two computers the following error continues to appear:
Error reading resource 'ProjectCycle.obj.Debug.ProjectCycle.Migrations.ModelsMerge.resources' -- 'Could not find file 'C:\Users\Chiappa\Documents\GitHub\ProjectCycle\ProjectCycle\ProjectCycle\obj\Debug\ProjectCycle.Migrations.ModelsMerge.resources'.' ProjectCycle C:\Users\Chiappa\Documents\GitHub\ProjectCycle\ProjectCycle\ProjectCycle\CSC
Screenshot 2
Any idea why this might be happening?
Suggestions on how to correct this problem?
Summary:
I have an ASP.NET web application that compiles correctly but fails when trying to generate the Web Deploy Package.
I solved the problem by excluding the "obj" folder from the Visual Studio project.
Right clic on the "obj" folder in the Solution Explorer, Exclude From Project.
As simple as that!
You could try going to the properties of the file and force the copy to the output directory.
Select the file on Solution Explorer
Press F4 OR Right-click and go to "Properties"
Change the value of "Copy to Output Directory" to "Copy Always"
Also, your Version Control may be locking the output directory (the "bin" folder), try deleting it manually.

"Error while trying to run project: Unable to start program". Can run program only once. Then VS needs restart

I'm running my .NET 4.0 (C#) project in debug mode after I start VS2013. It runs just fine.
The second time I start it from VS, I get the Dialog box that says "Error while trying to run project: Unable to start program C:\path\to\file.exe"
The process is still alive in the Taskmanager when I dismiss the dialog box.
From Windows Explorer, I can run the program just fine. And after closing it, the process is gone too from the Task Manager.
A rebuild doesn't help.
Is this a common problem with a known solution?
I had an issue similar to this and I had to clear the component cache instruction can be found Here.
Hope this helps.
For my case, it cause by Platform target, you could force choose it to x86 or x64 which your project is:
Each Project's Properties > Build > Platform target
As I pointed out also here, the only solution that worked for me was to disable the ConEmu integration:
ConEmu → Settings → Integration → Default term → disable Force ConEmu as default terminal for console applications
Some users reported that it was enough for them to disable the Aggressive mode in that same settings tab; that wasn't the case for me though.
The topic is old, but this might help someone else.
So in my case I made a file in Visual Studio with .cp extension (accidentally deleted the last 'p') this made visual studio just "include" the the file and not mark it as a compilation unit, thus not compiling it, I looked the *.vcxproj file in a text editor and found out about this, so if you open the project file in a notepad or something just find your file at the bottom usually and change from <Item .../> to <ClCompile .../>
I was getting similar errors. I just had to restart visual studio. Sometime couple times a day.
I had a similar error and resolved it by cleaning the solution. Right-click the solution name in Solution Explorer and choose Clean Solution.
I found a solution here:
Please check "Use Managed Compatibility Mode" under Tools|->Options->Debugging->General.
I'm Brazilian, I don't speak English very well. I did this translation on google translator.
I know the topic is old, but it can still help someone.
I had this same problem in the following situation, I have a dual boot computer (linux debian 11 and windows 10). Inside debian, on my NTFS D disk, I created a folder to perform programming tests. After accessing that same folder with windows, I created a new project in visual studio inside that same folder that I had created in linux. The creation of the project went without problems, however when I tried to run the project (F5), I received the same error from this topic. I tried all the solutions I found on the internet, and nothing worked. I gave all permissions to my admin user and it still didn't work. Then I realized that even going straight to the folder where the application's executable was and clicking directly on it, I still received the access denied error message. So, I took the project out of the folder I had created in linux, and it worked. So, what I could conclude, is that because the folder where my project was was created in linux, for some reason, my windows didn't trust this folder, so it didn't allow running executables from inside that folder, even this one executable having been created by visual studio from within windows.
Just simply create a folder name as "projects" in c drive and copy paste the newly created project in it. Run the project by doing clean & Build or Rebuild method . It will work
open the folder which contains the solution in visual studio.
again, open your *.sln file by double clicking it inside the solution explore once opened try running the solution or rebuild the solution. once rebuild gets completed, it will open without error from next time.
My way of solving the error : error while trying to load project : Unable to start program and c:\Path\to\file.exe was simply by
First restart Visual Studio
Click the build icon
Select the rebuild option
Run the Program or Debug the Program
This was a weird one. Going to put what happened to me here because it might happen to someone else. Everything was fine with the app until suddenly after some fairly insignificant code changes I suddenly started getting this error. Visual Studio was compiling the executable just fine. But, the moment I tried to run it (either from Visual Studio or directly) the executable file would be automatically deleted right out of the Debug folder. Super odd--never seen anything like it. I began to get suspicious that perhaps an anti-virus or the OS was somehow identifying a checksum or some signature in the executable as "dangerous". Or perhaps some obscure compilation bug was corrupting the executable. So on a hunch I made another innocuous change (added a couple of lines of code to color code some text in a rich text box) and the problem went away.

The Operation could not be completed. The system cannot find the path specified

I created a C# Website using Visual studio 2015 in my laptop, i copied the same folder to my desktop system and open in Visual studio 2015, when i try to run the application its suddenly gives following error.
The operation could not be completed. The system cannot find the path specified
Anybody feel same error in your latest Visual Studio 2015? I updated all the latest patches.
following trial are done
Re created the soluition file(.sln)
Deleted Web.config and added new one
Still the error exists, so i cant able to debug or run the application.
(1) Run VS as an admin (or elevated access) and open the solution.
(2) Set up a project as Start up Project (if you have multiple proj)
(3) Set up page as start up page.
this should help you run it
Create manually (Windows Explorer if necessary) a folder with name "Service References". Even if the folder does not appear in the Solution Explorer, is there.
Try adding the wsdl (xml) file again.
I had the same problem, resolved by creating a Connected Services folder in my project.
So juste create a Connected Services folder or a Service References folder in your project
I experienced this error. When I shorten the file path of the solution, the error disappear. I think you may put your solution to a folder with too long path name or your solution have some file with too long name.
I got a more specific project-load error message when I removed the project from the solution and tried to re-add it. In my case, it was because the URL/address of the application had changed in my local IIS. When I updated the tag in the .vbproj (or .csproj) file to the new value, then the project loaded successfully.

Visual Studio 2012 Deploying WPF via ClickOnce missing Files

I have a WPF project that I am ready to deploy using Visual Studio 2012 but I'm running into missing file issues. I've searched for hours to find nothing but incorrect information about VS2k12 not even having ClickOnce support to it being a bug in VS that was claimed to be fixed in an update but people still complain the update didn't fix it.
If I Start the project in VS it runs fine and my test button works as expected.
When I Publish the project, the publish succeeds, running setup.exe installs successfully and program starts to main window fine.
Clicking test button crashes the application on a FileNotFoundException.
Line that causes crash:
streamReader = new StreamReader("ReceiptTemplates/templates.xml");
FileNotFoundException:
Could not find file
C:\Users\dirt\AppData\Local\Apps\2.0\GEDD6PQW.N72\8M9ONPGG.TVB\prof..tion_40c30d08e677b188_0001.0000_985901e6c8ad767f\ ReceiptTemplates\templates.xml'.
Exists:
C:\MyProject\bin\MyMode\ReceiptTemplates\templates.xml
Confirmed Does Not Exist: C:\Users\dirt\AppData\Local\Apps\2.0\GEDD6PQW.N72\8M9ONPGG.TVB\prof..tion_40c30d08e677b188_0001.0000_985901e6c8ad767f\ReceiptTemplates\ReceiptTemplates\templates.xml
The templates.xml file has a Build Action of Content.
Note: There are other folders/files in the ReceiptTemplates folder that are present such as folder/item.html and picture.bmp, just not the templates.xml file that I can tell...
What am I missing?
Thanks to #drch for this:
In my case the ReceiptTemplates/templates.xml file was set to be a "Data File" and not "Include".
Solution:
Right click Project -> Properties -> Publish -> Application Files
Find file causing issue and change it to Include
If it says 'Data File' its in the data folder
If it says 'Include' its in the bin folder
Check in C:\Users\dirt\AppData\Local\Apps\2.0\Data for it ;)

Categories