Scott Hanselman

Forcing NAnt to build and run with a specific version of the .NET Framework

June 22, '04 Comments [0] Posted in Nant | XML
Sponsored By

If you're not careful, and you have both versions of the .NET Framework on your box (1.0 and 1.1) NAnt will build your stuff using .NET 1.0.  Whether that's what you want or not, it's important to be explicit.

There's two ways:

  • Add <property name="nant.settings.currentframework" value="net-1.1"/> to your .build file(s).

or, to make the change to .NET 1.1 as the default, look in the NAnt.exe.config file in the same directory as NAnt.exe.

In this XML config file, in /configuration/nant/framework/platform[@default] you'll want to set that default attribute to "net-1.1" like this.  Note: The ID "net-1.1" corresponds to a named <framework> section called "net-1.1" further down in the file that gives NAnt all the info it needs to build on that version.  NAnt can also be used to build Mono, at least as of version 0.28 of Mono.

<configuration>
     ...snip...
  <nant>
        <frameworks>
            <platform name="win32" default="net-1.1">

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Visual Studio MSI Problems: Unable to build project output group 'Content Files from SOMEWEB (Active)'

June 22, '04 Comments [7] Posted in ASP.NET
Sponsored By

Often when building MSI Windows Installers from ASP.NET Web Projects within Visual Studio.NET you'll get this error:

Unable to build project output group 'Content Files from SOMEWEB (Active)'

And you'll have no idea why this happened, no descriptive error message, nada.

Turns out that this is the MSI builder's way of telling you that it can't physically find a Content File that is referenced in the Project (CSPROJ, or VBPROJ). 

The trick is turn on 'Show All Files' and open every folder until you find one with the Yellow Yield Icon.  This subtle tip is telling you that this file doesn't exist on disk, but it does exist in the Project.  Right-Click on it and Exclude From Project. 

When the MSI Installer builder can't find a file marked as Content, it borks.

Enjoy.

 

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

DCOM lives!

June 21, '04 Comments [0] Posted in Web Services
Sponsored By

Interesting stuff from Adi Oltean, a DCOM Server implemented entirely in C# - great stuff, I've been there, brother.  I've said before, DCOM deserves our respect.  Calling back to something Clemens said:

Enterprise Services has a very elegant solution for mixing the two models in that it uses Remoting to do almost all marshaling work (with two exceptions: QC and calls with isomorphic call sigs) and then tunnels the serialized IMessage through DCOM transport, which means that you get full CLR type fidelity while using a rock solid transport that has been continuously optimized ever since 1993. I understand that some people consider a 10 year old protocol boring; I just call it "stable." [Clemens Vasters]

 

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

The "I'll have Larges Fries and a Diet Coke" Style of Programming

June 18, '04 Comments [13] Posted in ASP.NET | Web Services
Sponsored By

I was at a local fast food joint today and a fairly large individual in front of me order a Double Cheeseburger, Large Fries, and a Diet Coke.  The irony was as big as his backside.

An hour later at work a fellow identified an opportunity to reuse some code (Diet Coke = Good) but in the interest of schedule, ease of deployment, the differenting contexts the original code was used in, changes to the installer, etc. etc., the quickest way to use the code was by copying and pasting (Large Fries = Bad) from one subsystem to the other.

Ordinarily this would have killed me a little inside, but...sigh...at least it was a Diet Coke.

Was I wrong?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Web Setup MSI fail when used on Servers with the Loopback Adapter installed

June 18, '04 Comments [1] Posted in ASP.NET
Sponsored By

Travis, who works with me, sent out a useful Gotcha today that was too useful to not blog.

We have a VM that requires the Host OS to use the Microsoft Loopback Adapter in order to create an internal subnet that is local to that machine.  It keeps the VM sequestered. 

However, due to the way the Loopback Adapter works, Visual Studio Web Setup Projects (MSIs) will fail.  To fix it, disable the Loopback Adapter, run the install, then enable the adapter.

(The problem is that, on install, the installer looks at the path it's going to install to and it comes back like http://machinename/http://machinename/targetpath <http://machinename/http:/machinename/targetpath>  - note the looping back going on there.  The installer doesn't like that.)

Interesante, but that's what you get when you do unusual stuff, eh?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.