문제

I am following a tutorial to consume WSDL in a C# aplication:

http://my.execpc.com/~gopalan/dotnet/webservices/webservice_csharp_client.html

At step 2, it says do following:

C:\MyProjects\Cornucopia\WebService\Client>csc /t:library /r:System.Web.Services.dll /r:System.Xml.dll OIDServer.cs

But csc.exe was not in my path so ı have searched for it and the result:

enter image description here

There are 20 different csc.exe in my computer. Which one should I use? I am running Windows 8 x64 EE.

도움이 되었습니까?

해결책

Usually you want to use the one in C:\WINDOWS\Microsoft.NET\Framework\vx.x.xxxxx\.

Where the x.x.xxxxx is the Framework version you are targeting. So if I were trying to use the C# 4.0 compiler, I would use "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe"

다른 팁

Just press Start then start typing "Developer" and select Developer Command Prompt for VS2012.

As vcjones said use the one that is in the .NET Framework directory with the the lowest .NET Framework version you want to support.

The other csc.exe are only backups of the .NET Framework stored in the WinSxs folder which are installed by the MSI installer. Since the .NET Framework ist part of the OS there is always a backup in the WinSXS folder present to be able to do a restore when something bad did happen. But since the .NET Framework did use already a different location

%Windir%\Microsoft.NET...

Now we have two locations where the .NET Framework files are located. The other versions you did see were different patch levels of the .NET Framework which do stay in WinSxs for "backwards" compat reasons which does not makes sense for .NET Framework parts but for unmanaged dlls.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top