Unable to read manifest Properties\app.manifest - c#

While building a C#.net application in VS studio 2013 i am getting the following error
Unable to read manifest Properties\app.manifest.Could not find file
C:\Project\Properties\app.manifest
In project Settings i selected option "build Project without a manifest" but still getting the same error.

I fixed this by myself by deleting app.mainfest in visual studio which is showing up in properties folder.

Late in the party but,
Actually this file is mentioned in cs.proj file and your project is looking for this file.
What I did is , I have removed app.manifest reference in my cs.proj file as it is not needed to me , added by someone.
Open your cs.proj file in notepad and remove below mentioned line
This did the trick for me.

Related

How do I force Visual Studio 2019 to generate a .deploy file for an icon for ClickOnce deployment/install

I'm running into a problem publishing/installing a ClickOnce application being built in C# in Visual Studio 2019. The application is being built using .NET Core 3.1 and WPF.
I have an icon I am using for the application that is included in the project with the filename "loader.ico". The ClickOnce manifest is calling out for loader.ico, but the required Loader.ico.deploy file is not being generated when publishing, which is throwing an exception when trying to run the setup.exe to install the application to a client PC (actual filepaths have been replaced with [Path]:
+ Downloading file:///[Path]/x64/ClickOnce/Application Files/.NET Bootloader_1_0_0_4/loader.ico.deploy did not succeed.
+ Could not find file '[Path]\x64\ClickOnce\Application Files\.NET Bootloader_1_0_0_4\loader.ico.deploy'.
I have attempted a few things using what information on the problem I could find:
I set the Build Action for loader.ico to Content and set Copy to Output Directory to Copy Always. I also set the "Settings>Application Files" setting for loader.ico to Include. This has no effect on the resulting Publish, and no loader.ico.deploy file is generated.
I also receive the following in the output window when publishing:
Unable to apply publish properties for item "loader.ico"
I have also tried excluding loader.ico from the "Application Files", but this does not remove the reference in the .manifest file.
So now I am at a bit of a loss. I don't know why it would demand a .deploy file for the icon (I'd think it would just be embedded? No need for a separate icon file?). I can't seem to get the ClickOnce publishing process to generate the required loader.ico.deploy file, and I can't seem to get the manifest to remove the reference to it. What settings could be used to force the generation of this .deploy file (or force the manifest to not reference it)?
I had the same problem your application .ico file causes this error so you have to change its properties setting to Build Action: Content and Copy To Output Directory: Copy always.
hope it works
I can confirm from my very own experience how frustrating this is. I have tried anything and everything.
For the time being - until this issue is sorted - I am suggesting that you manually add the .ico file to the Apllication_1_0_0_x folder and appending '.deploy' at the very end.
So file will look like 'my-icon.ico.deploy'.
It works. Tried and tested.
In my case it helped:
Publish -> Show all (Settings current project) -> Settings -> Application Files -> (Show all files):
Find ico file, select publish status to Include | (Required) | Include.
From now on, the ICO file will be added when publishing
Additionally to the icon loading problem that I initially "solved" with Avrohom's method, I faced some issue with WebView2 not working / being loaded.
Both of these problems stopped when I disabled the click once publishing profile (.pubxml) option for producing a single EXE file:
<PublishSingleFile>False</PublishSingleFile>
Tested with .NET6, Visual Studio 2022

Unable to load resource (.resx) file because it is not trusted

I am facing an issue while building windows source in Visual studio 2017. Showing the error message mentioned in the title.
Anyone have any idea about this error message?
Finally I could have resolved the issue as below:
Open the file explorer. Navigate to project/solution directory
Search for *.resx. --> You will get list of resx files
Right click the resx file, open the properties and check the option 'Unblock'
Repeat #3 for each resx file.
Reload the project.

Could not find file 'bin\Antlr3.Runtime.pdb' Error when creating deployment package

I'm getting the following error when tried to create deployment package.
"Copying file bin\Antlr3.Runtime.pdb to obj\Release\AspnetCompileMerge\Source\bin\Antlr3.Runtime.pdb failed. Could not find file 'bin\Antlr3.Runtime.pdb'"
Can someone tell me what is happening and how to solve it
First of all delete whole file from bin folder
Remove reference of this "Antlr3"
Close Visual Studio
Open .croj project file in Notepad
find 'Antlr3.Runtime.pdb' and you found this in "ItemGroup". See ScreenShot
Remove below lines and save file.
Open project and re-rebuild solution.
It's working fine for me. Let me update here this is work for you???
For some reason "Clean" and "Rebuild" leaves the dll in the bin folder, but don't bring the missing .pdb.
The manual deletion of the entire bin's content and consequent "Rebuild" does the job

c# - Publishing Error / File Not Found

I am trying to publish my website in VS 2015, but I am receiving the following error:
Copying file Views\Shared\_StockQuotePartial.cshtml to
obj\Release\Package\PackageTmp\Views\Shared\_StockQuotePartial.cshtml
failed. Could not find file 'Views\Shared\_StockQuotePartial.cshtml'.
I have checked the Views\Shared folder (with all items showing) and no file named _StockQuotePartial.cshtml exists. I have also deleted the obj and bin folders and attempted to republish, but with no success. In addition, I have looked for references in the .csproj file and found non.
Any idea as to why I am getting this error for a file that does not exist / how I can resolve it?
Try to rebuild the project and then publish it ..

The item \xxx\yyy.cs" was specified more than once in the "Sources" parameter. Duplicate items are not supported by the "Sources" parameter

this is an mvc web application. I have read many blogs and articles which are relevant to this but does not find any solution.
i have checked in .csproj and does not find any duplicate entries for file in .csproj file.
Close Visual Studio.
Go to Folder where you saved project
Open projectname.csproj in notepade.
Find your file name under tag
Remove if found duplicate entry and save project.
Open again project in Visual Studio and problem solved :)

Categories

Resources