Error "Calculating permissions failed" in Visual Studio 2008
I have a very short query here. One of my friend using Visual Studio 2008 is facing a problem from last few days. Whenever he use to click "Calculate Permissions", it gives error message saying, "Calculating permissions failed.Could not load file or assembly 'AssemblyPath' or one of its dependencies. An attempt was made to load a program with an incorrect format."
How to fix this error ? Help appreciated !!
Re: Error "Calculating permissions failed" in Visual Studio 2008
This problem occurs when the Platform target property is set to x64. To work around this problem , change the value of the Platform target property to x86 or to Any CPU. To do this, follow these steps:-
- In Solution Explorer, click the project name.
- On the Project menu, click ProjectName Properties.
- Click the Build tab, and then select one of the following items in the Platform target list:
- Click the Security tab, and then click Calculate Permissions.
Re: Error "Calculating permissions failed" in Visual Studio 2008
To fix this error you can also use the PermCalc.exe file to manually create the permissions for your assembly. To do this, follow these steps:
- Click Start, click Run, type cmd, and then click OK.
- Type the following command, and then press ENTER:
Code:
cd DriveLetter:\ Program Files\Microsoft SDKs\Windows\v6.0A\bin\
- Type the following command, and then press ENTER:
Code:
PermCalc –CleanCache "AssemblyPath"
- Locate and then open the XML file that the PermCalc.exe file created.
- Copy and then paste the contents of the XML file into the App.manifest file in your project.
Re: Error "Calculating permissions failed" in Visual Studio 2008
Thanks for the quick help, mate. That is all i wanted to know.
I hope this can help me out for sure. Help appreciated. Keep it up. :thumbup1: