Tuesday, May 24, 2011

aspnet_merge unresolved assembly reference not alllowed in ASP.NET 4

Hopefully this'll save someone else some time.

I have a moderately large VB.NET ASP.NET website, originally created in ASP.NET 2 and recently upgraded to ASP.NET 4.

I recently built my own packaging scripts that use aspnet_compiler and aspnet_merge.

I was careful to use the .NET Framework v4 version of aspnet_compiler.

When running aspnet_merge on the precompiled website, I got a very strange error :
Utility to merge precompiled ASP.NET assemblies. Version 3.5.30729.
Copyright (c) Microsoft Corporation 2007. All rights reserved.

aspnet_merge: error occurred: An error occurred when merging assemblies: Unresolved assembly reference not allowed: Microsoft.VisualBasic.
The problem was pretty obvious, but stumped me for probably an hour or so : I was using the wrong version of aspnet_merge.exe.

This page helped me find the correct version. On my computer, that's in :

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\aspnet_merge.exe

HTH :o)

5 comments:

Matt B said...

Thanks! Saved me some time for sure!

Verbose Philosopher said...

Glad to be of assistance! :o)

Anonymous said...

You probably saved me a couple hours, thanks! :)

Unknown said...

Hello

It's a real pity you don't want to hear anybody else at The Verbose Philosopher, you say "Question your own views" so I did, just don't wanna listen? because I don't believe that speaking has ever killed anybody, love is good, and god is supposed to love us all, so why do you hate people that are just different from you?, I respect your opinions but if you don't just listen you will never, ever , know WHY other people think in other ways....

Your trully,
JB

Unknown said...

Thanks a million. Saved me hours too. Doesn't help they put one version in v7.0A\Bin and another in a sub folder v7.0A\Bin\NETFX 4.0 Tools.