Getting issue with sn.exe running outside the NETFX 4.0 Tools

1.4k views Asked by At

Did anyone figure out why the .net 4.0 verision of sn.exe crashes if run outside C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools\ ? (Using Windows XP, 32-bit)

Visual Studio 2010 works just fine, sn works while inside the NETFX 4.0 Tools (called directly or while on PATH).

The .net 3.5 version (from ..\Bin) works fine and can be moved around.

I'm just trying to get an auto build, but it seems that sn.exe needs to live where it is... Could that be the thing? Am I missing something obvious?

1

There are 1 answers

1
stic On

Thanks to Process Monitor I've got it...

Apparently resources for sn.exe, gacutil.exe or PEVerify.exe in .net 4.0 are extracted to an external folder that is by default at C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools\1033 i.e. the sn.exe file is snrc.dll - copy the ..\1033\snrc.dll along your new location of sn.exe and you are set.

Found it only because PEVerify.exe gives a little bit more meaningful error messages than sn (which just crashes)