Dismiss
Announcing Stack Overflow Documentation

We started with Q&A. Technical documentation is next, and we need your help.

Whether you're a beginner or an experienced developer, you can contribute.

Sign up and start helping → Learn more about Documentation →
    @echo off
C:
Cd \
Cd Windows
CD Microsoft.NET
CD Framework
CD v4.0.30319
set /p phyPath= Enter Physical path in double quotes:-
set /p virPath= Enter Virtual path in double quotes:-
aspnet_compiler.exe -p %phyPath% -v / %virPath%
echo process completed
pause

I have a .bat file with the following commands which i run to compile an ASP.NET MVC 3 web application targeting .NET 4.0

On my development machine where i'm doing the compilation, i have both .NET 4.0 and 4.6

This is messing up my compiled code because when i execute my .bat file to compile my MVC application source, the batch file launches the ASP.NET Compilation Tool Version 4.6.1055.0 but i want to compile my code with ASP.NET Compilation Tool Version 4.0.30319

When i check on my dev machine folder location C:\Windows\Microsoft.NET\Framework64\v4.0.30319, i see that the aspnet_compiler.exe file found there is indeed version 4.6.1055.0, so it seems the installation of .NET 6.1 upgraded my compilation tool yet the target server only has .NET 4.0

How can i force my .bat file to target Version 4.0.30319 of the compilation tool?

AS a result of this scenario, i'm facing the problem i have posted here InteropServices.COMException (0x80005000): Unknown error (0x80005000) when querying active directory

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.