Sasha Sydoruk

Building a better mousetrap with XHTML, AJAX and RSS

Could not find file ‘Microsoft.Windows.CommonLanguageRuntime, Version=2.0.50727.0′

Today I was working with a solution that had 2 console applications. Console application A was creating a child application domain and executing the console application B in the child domain. Console application A had a project reference to console application B.

Everything worked until I decided to turn down code access security in the assembly that is being executed. Properties -> Security -> Enable ClickOnce Security Settings. Select “This is a partial trust application”. For ClickOnce Security Permissions pick “Internet” zone.

Now, when I try to rebuild the solutions I get this - Could not find file ‘Microsoft.Windows.CommonLanguageRuntime, Version=2.0.50727.0′.

To resolve this problem you have to uncheck “Enable ClickOnce Security Settings”. Once you do it, you will be able to rebuild your solution.

But what if you want to keep your ClickOnce security settings? Make sure you reference your assembly B as a file and not as the project.

1 Comment so far

  1. Eric Knox (MS) April 13th, 2007 9:44 am

    I’m hoping that better late than never applies here when I say that this was a bug that we fixed. The fix will show up in the next version of Visual Studio and .Net Framework [specifically in the version of VS that is currently code-named Orcas and .Net Framework 3.5].

    Your workaround will still be valid after the fix is available in the next version, so now that you’ve employed that fix you shouldn’t have to bother with anything. However, I thought it was worth saying that this was a bug and we did fix it.

Leave a reply