Quantcast
Channel: Microsoft "Roslyn" CTP forum
Viewing all articles
Browse latest Browse all 504

Why can't I use environment variables in the file path when loading a dll?

$
0
0

When trying to write some automation scriptcs with scriptcs I've found an issue trying to use the System.Web.Administration when having IIS Express installed. The problem is that I want to access the regular System.Web.Administration but when Express was installed that version was used instead and I couldn't change my regular IIS installation. One way arround this was to specify the full path to the correct dll as such:

#r "c:\windows\System32\inetsrv\Microsoft.Web.Administration.dll"

But that something I think is womewhat hacky since the path is hardcoded when I know the c:\windows part i also stored in the windir environment variable. So what I would like to do is:

#r "%windir%\System32\inetsrv\Microsoft.Web.Administration.dll"

Tomas Jansson


Viewing all articles
Browse latest Browse all 504

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>