Can't find the valid AspnetCompilerPath - visual-studio-2013

I have a web application that's failing to publish, from the command line.
It's a VS2013 web application project, with a publish profile defined:
Publish method: File System
Configuration: Release
File Publish Options:
Delete all existing files prior to publish
Precompile during publishing
When I publish from within the IDE, everything works fine.
When I publish from the command line:
msbuild myapp.sln /property:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=myapp
I get errors:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Transform\Microsoft.Web.Publishing.AspNetCompileMerge.targets(411,5):
error : Can't find the valid AspnetCompilerPath [E:\dev\korweb_ws\trunk\korweb_ws\korweb_ws.csproj]
Any ideas as to what might be going on?

I know your question has been open for over a month - hoping you were able to solve it by now. If not, I hope this helps.
Try setting the "AspnetCompilerPath" value on the command line to the absolute path to the appropriate .NET framework folder. For example, for 64-bit .NET 4, the path might be like this:
/p:AspnetCompilerPath="C:\windows\Microsoft.NET\Framework64\v4.0.30319"
That's what worked for me, when I had a similar issue.
-Brian

I know that windows Azure is not mentioned in the OP, but I ran into this problem too trying to publish to Azure. This question came up in my search for an answer, so I'm posting here so maybe it will help someone else in my position.
What worked for me was to download the publish profile (again) and then redeploy. After that, publish worked fine.

I was getting this error when I tried to publish. What worked for me was un-selecting "PreCompile during publishing." The setting is in the Publish Profile.

Related

Failing to deploy - looking at third party sites for Nuget packages

I have a bog standard .Net Core ASP MVC page utilising EF and utilising Telerik Components.
The project works great on my machine without fail.
I am however no good at the devops side and don't get the ecosystem that goes around the project. I am trying to build a deployable package, and it appears to go through stages where it says "restoring packages for xxxxx"
it then tries to contact https://nuget.telerik.com/nuget/FindPackagesById()?id= for a whole variety of packages and fails
It then goes through "installing" all of them (I can only assume it tries a different repo), then it fails on some one.
The build then fails with
c:\Program Files\dotnet\sdk\2.1.503\Sdks\Microsoft.NET.SDk\targets\Microsoft.PackageDependencyResolution.targets(198,5): Error NETSDK1004 Assets flie xxxxxx not found. Run a NuGet package restore to generate this file.
This file does not exist though and I have tried numerous solutions without any luck (one being to clear the Nuget Cache - and, I waste 2 hours trying to fix the project after that!).
Can anyone advise the next steps?
Maybe what you're experiencing is something similar to this issue which has been reported to Github dotnet /SDK. And the same cause like this issue.
Not sure what the real msbuild command you use in Devops, but please try adding the /Restore or -restore switch to the command. It could look like: msbuild ...... /Restore
Let me know if it helps:)

How to fix InstallShield error -1501: Could not compress?

I'm using an InstallShield project to generate setup files. Everything was working fine, but I've recently encountered following error which says,
Could not compress "bin\x86\QA\AppManifest.xaml" into "\Default
Configuration\MSI
Could not find file
"bin\x86\QA\AppManifest.xaml" ISDEV : error : -6103:
So far I have been unable to fix these issues. Can someone help me understand what I may be doing wrong?
Thought it's late to reply, I came with similar error on dynamic file linking. But, problem was with double slash being on Resource directory.
My problem was, I provided path as : "PATH_TO_HELP_FILES\Docs\", while i removed the last \ on path i.e PATH_TO_HELP_FILES\Docs, the problem was gone.
It could be the AppManifest.xaml is missing from the source folder? I think this is the most likely scenario - your application build could have failed, and this particular file could be missing?
You could also have a file lock in the build output folder - did you try to reboot and rebuild?
You can also try to run the release wizard and make a new release configuration and try to build that
http://www.codeproject.com/Articles/192738/What-is-AppManifest-xaml-in-Silverlight
Another late reply. For my situation, I merged multiple branches together, and something is lost along the way. It was probably a setting file or something with the gitignore file. Anyways, I got that same -1501 could not compress file error. The reason was the build order of projects in the solution. Incorrect build order caused VS to look for dependencies when they were not yet created or included. I right-clicked on the solution, went to the Dependencies tab to set the order (by setting dependencies). Once that was done, I could Clean Solution and Rebuild Solution without getting any error.

Unable to Activate Windows Store App

I installed a retail version of Windows 8 Pro. I downloaded and installed Visual Studio Express 2012. I asked for and received a developers certificate. Then I tried to create a hello world app.
From there I get a "Unable to Activate Windows Store App" message box when I try to debug the app. Most commentary on the web says delete build directories. This didn't work for me
Does anyone have a solution for how to fix this and debug my app?
This happened to me once too, but the deleting build directories advice fixed it. Specifically, you just need to delete the bin\Debug and bld\Debug folders in your projects. Their contents will be regenerated by Visual Studio when you rebuild. I assume that this is only one project since it's a Hello World app; otherwise I would ask if you deleted build directories from all projects in your solution.
You can also try running "Clean Solution" from the BUILD menu in Visual Studio.
I'm sorry...it's horrible if this is happening on a clean install as you describe.
I ran into the same issue, and tried rebuilding, cleaning, deleting temp files, rebooting the computer, etc... and nothing helped.
Then finally I made a release build then went back to debug. And now it works.
I have no idea what happened, nor if that really helped, but it's worth a try.
For me a RESTART of pc solved this error message.
For me the problem was that I created the app on a TrueCrypt mounted virtual drive and when I moved the project files to a normal drive then everything worked just fine. Weird.
I was getting the exact same error. In my case the culprit was a NuGet package. It had added an app.config file to the project and it was confusing VS. I removed the app.config file and it solved my issue.
I got the solution at Iris Classon's site.
This can be solved by Uninstalling the app from the start screen then again building the app from Visual Studio.
I had a similar problem, and the cause was creating the project on a USB thumb drive. Creating a project on a normal hard drive volume works.
this can happen when the application signing key (.pfx file) is missing.
Try the following:
Open the Package.appxmanifest file in Visual Studio
Go to the register "Packaging"
Select [Choose Certificate…]
Select the test certificate using [Configure Certificate…] [From File…], or create a new one using [Configure Certificate…] [Test Certificate…]
When using a test certificate, ensure that it is in the .gitignore file. There should be an entry like !**\*_TemporaryKey.pfx to include the key in Git.
Note: The certificate for release build should only be available to the build server and not included in Git.
Rebuild the project
This has happened to me in the past and I have always found that deleting the build directories resolves it.
However this time this is not working for me.
I have tried
- Rebooting
- Deleting build directories
- Running Build | Clean Solution in VS
- Renewing Developer Account
The only thing that will work for me is changing my Package name under the Package.appxmanifest
However I am not overly happy with this as a solution. I will keep investigating.
The issue might be caused because NuGet will try to add an app.config with binding redirects to Windows Store apps if it thinks it is needed. However, Windows Store apps don’t need app.config, and will actually fail to start with a very confusing error message if it is present.
And the solution in this case would be to Remove the App.config
This error generally comes when you try to deploy in debug mode.
I would suggest, deploy the app first in release mode and then try in debug mode.
This worked for me.
Making a new certificate works for me. For this, go to Package.manifest->Packaging, and follow the Choose certificate.... Click on Configure certificate and select Create test certificate. Give it a name and press OK.
Increasing the revision number of the package worked for me
Tried so many of the above fixes. Nothing worked (deleting bin, obj dirs, editing the manifest, editing the registry, changing package name, etc, etc.) My Avast antivirus software was running and so I uninstalled it completely. That was it. App now runs fine.
This sort of problems are common with Windows 8 Visual Studio. Such errors encounters when your developer license of Visual Studio has expired so you may want to renew or get a new developer license here's how you get that. How to get a developer license in Windows 8
And similar problem may also encounter with E_Fail issues here's how to solve Unable to activate Windows Store app E_Fail Issue
For me, the fix was a combination of two of these answers -
Renew the developer license (How to get a developer license in Windows 8)
And deleting the build directories (though I deleted more then the screenshot depicted) Delete the Build directories
NuGet will try to add an app.config with binding redirects to Windows Store apps if it thinks it is needed. However, Windows Store apps don’t need app.config, and will actually fail to start with a very confusing error message if it is present.
Solution:
Remove the App.config
and build again
For those who get a similar error but who are searching for a solution while debugging an IOT background app on a local machine specifically - you can find it here.
Using the search term "unable to activate windows store app the activation request failed with error" brought me here.
Because of Two things i resolved this issue.
Basically, we just need to delete the bin\Debug and bld\Debug folders in our projects. Those contents will be regenerated by Visual Studio when you rebuild project.
Just Restart the Visual Studio. And Clean Build and Rebuild the solution and RUN it.
Hope this helps.,
Playing with this issue for 3 days, tried every suggestions, nothing works. Until now!!!
The solution was this for me:
renew developer licence
build and deploy solution in Release mode (after this step it still not worked, but VS installed some packages in rpi)
start VS remote debugger with default account (http://:8080/#Debug%20settings)
configure remote device with Universal authentication mode (VS2017 -> Project settings -> debug -> target device: remote machine, authentication mode: Universal (unencrypted protocol))
...and now I can sleep.
Hope it helps somebody.
This gift was courtesy of Microsoft's automatic updates for VS2015 which was one of the 2 culprits:
KB3022398
KB3165756
It also broke SourceTree and other apps that draw the GUI - making an outline of the app but not drawing the contents.
For me changing the Package Name in Package.appxmanifest fixed the problem
In my case, the C# UWP app had a native library which failed in the application startup code, and called exit(1). The symptoms were identical to those in the question, though. Visual Studio would throw a message:
Unable to activate Windows Store app '88888888-6666-5555-4444-111111111111_abcdefgh!App'. The Acme.exe process started, but the activation request failed with error 'Operation not supported. Unknown error: 0x80040905'.
In addition, there was a message in the UWP app Windows log under Microsoft\Windows\Apps\Microsoft-Windows-TWinUI/Operational: event ID 5961, message:
Activation for 88888888-6666-5555-4444-111111111111_abcdefgh!App failed. Error code: Unknown HResult Error code: 0x80040905. Activation phase: COM App activation
Internally, the C# part would try to construct a native class instance from the App constructor, the native class constructor would encounter an unrecoverable error and bail. From the UWP subsystem standpoint, and from the debugger standpoint, though, this looked as something distinct from the mere programmatic exit. I'll leave this answer here, 'cause I've spent some time chasing various UWP failure scenarios instead of running under a native debugger.
I've replaced the exit() call with throw ref new Exception(E_INVALIDARG). At least this way the error manifests in the managed debugger, and the message is descriptive.
I've been having this problem a lot with a UWP Windows 10 app on Visual Studio 2019...for me the reliable workaround is to bump the Build number in the Package.appxmanifest file (Packaging tab). It's a huge pain...really hope Microsoft will sort this out soon
Any existing error in the code can also cause this issue. Make sure your previous version of the code is working fine. Compare the difference and make sure all looks good.
I was getting this error and nothing else worked so I had to dissect my program. Turns out I referenced a StaticResource in my App.xaml that didn't exist.
Seems like a silly error but you'd also think Visual Studio would pick up on something like that and throw a different error so if nothing else works, double check your application resources.
As suggested by #Iman in a comment, in the UWP project settings, enable "Compile with .NET Native tool chain".
(After trying just about every answer in this question)

tfs build can't find resx files

I am trying to use automated builds and deployments to our test IIS web server, however, as of recently, for some reason, the builds are failing with reasons for:
Cannot find Errors.resx
Errors.resx is a file within the project, and it's checked in. Even the Publish option from VS2010 works fine.
Has anyone come across this before?
I had something similar to that, I think I ended up manually patching a value in a resource file in notepad++
see msdn link

Unable to build project output group Content Files from

currently I'm trying to create an WebSetup Project for one of our ASP.net4/Silverlight-Web Applications using Visual Studio 2010.
I created the setup Project according to this tutorial, but when I'm trying to build the Setup Project (I did a build of the whole solution before), I get the following error:
Unable to build project output group 'Content Files from MyWebProject (Active)'
According to this and almost any other site I found, this error refers to items that are included in the web-project but missing on disk.
I checked all my projects twice, there is no missing file.
Are there any other solutions to this problem?
Other things I tried:
This post: I do have .xml Files accompanying our .dlls. I also removed the xml File from my project, but it didn't help either
This post: Setting the startup project to my web application changed nothing.
Both of the above Posts are from this thread on forums.asp.net.
I had this problem also. (Visual Studio 2010 Pro, .Net 4.0) I found the missing file using "Publish..." option. Right click on the web app. Up near the top of the menu (5th from the top for me) is "Publish...". Click that. I did "Publish method: File System". Publish fails for the same reason that building the setup fails. The difference is that when Publish fails, it gives an error message.
In most cases it's due to missing files.
Expand all your projects and check that none of them is marked with the Yellow Exclamation mark.
For web applications the usual suspect is config.web and more specifically the Debug/Release versions , click on the '+' next to the Web.Config and see if they are marked as missing.
Good luck
I have faced the same issue at my side. `
[how to resolve ERROR: Unable to build project output group 'Content
Files from XYZ.xyz (Active)]
so solution ==> as per my project resolution I was just removed the reference file same name as the reference shown in the error block as [XYZ.xyz (Active) ] from the WCFSetup project followed by clean with Rebuild the solution.
The problem will be resolved and .MSI, as well as .setup file, will generated

Resources