Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Building a project that uses PowerShell using MSBuild

1 view
Skip to first unread message

AndrueC

unread,
Jan 8, 2008, 8:49:03 AM1/8/08
to
I'm trying to set up a build machine and am using MSBuild. We have a project
that builds fine under VS2005 but can't be built using MSBuild.

According to msbuild-results.xml:

- <message level="normal">
- <![CDATA[ For SearchPath "{GAC}".
]]>
</message>
- <message level="normal">
- <![CDATA[ Considered "System.Management.Automation", which was not
found in the GAC.
]]>
</message>

Except that gacutil states:

"System.Management.Automation, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"

..and VS2005 on that machine is perfectly happy.

Keith Hill [MVP]

unread,
Jan 9, 2008, 12:14:25 AM1/9/08
to
"AndrueC" <And...@discussions.microsoft.com> wrote in message
news:1F8BFB95-0760-4640...@microsoft.com...

As a general rule you shouldn't build/develop against assemblies in the GAC.
If you install the Windows 6.0 SDK, you can find the PowerShell assemblies
installed at:

%ProgramFiles%\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0

--
Keith

AndrueC

unread,
Jan 9, 2008, 7:20:01 AM1/9/08
to

"Keith Hill [MVP]" wrote:

I agree but unfortunately changing the project isn't really possible because
it's frozen by QA. It's also worth noting that the assembly is not in that
location with recent versions of PowerShell. Apparently it's now part of the
Windows SDK.

I guess that VS is able to work around the issue whereas MSBuild can't. Oh
well - I'll have to wait until the project is unfrozen again.

AndrueC

unread,
Jan 9, 2008, 7:46:00 AM1/9/08
to
> I agree but unfortunately changing the project isn't really possible because
> it's frozen by QA. It's also worth noting that the assembly is not in that
> location with recent versions of PowerShell. Apparently it's now part of the
> Windows SDK.

Oops, I didn't read your post properly and see you already mentioned that.

0 new messages