Note that there are some explanatory texts on larger screens.

plurals
  1. POPrivate _Accessors don't build with MSBUILD
    primarykey
    data
    text
    <p>I have a build script (.bat) that invokes MSBUILD (<code>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe</code>) that <em>used to</em> work for a while but stopped working after I installed <code>VS11 Developer Preview</code>. Now, the build is not able to rebuild projects that include MSTest unit tests with private accessors. </p> <p>I am getting </p> <blockquote> <p><strong>error CS0246:</strong> The type or namespace name 'BaseViewModel_Accessor' could not be found (are you missing a using directive or an assembly reference?)</p> </blockquote> <p>which pretty much means that MSBuild refuses to auto-generate the BaseViewModel_Accessor assembly. Of course, BaseViewModel is just an example - I am getting the error for every test class that requires accessors.</p> <p>Those very same projects build just fine on the same machine from within <code>Visual Studio 2010</code> (but not <code>VS11</code>).</p> <p>I am aware of at least <a href="https://stackoverflow.com/questions/1320039/private-accessor-dont-build-when-using-msbuild">one answer to this question</a>, but it is somewhat unsatisfactory, as VS is obviously installed on my machine, and I am not using NUnit but Microsoft's very own unit testing framework. </p> <p>I suspect that the observed behavior might have to do with the fact that VS11 is a "Developer Preview" (my VS10 is Ultimate), so it may be crippled and not able to generate the accessors. However, I am explicitly using <code>.NET 4 MSBUILD.exe</code> and so expecting it to be able to use whatever VS10 is using internally...</p> <p>Anyway, if someone has any less invasive solutions than to remove both Visual Studio installations and .NET 4.5, and re-install everything from scratch, they would be much appreciated. </p> <p>There's got to be a way of fixing whatever got broken by installing VS11. Preferrably, I would like to keep <code>VS11/.NET 4.5</code> installed, and not have to reinstall VS10 from scratch... However, I already tried "repairing" VS10 and it did not help.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload