learnerplates

I've just noticed the my ItemTemplates and ProjectTemplates are no longer being generated by MSBuild.
The Detailed output in Visual Studio shows the following:
Target "ZipFiles" skipped, due to false condition; ('@(ZipProject)_@(ZipItem)' != '_') was evaluated as ('_' != '_').

Any idea what this means





Re: Visual Studio Extensibility ZipItem and ZipProject not longer generating ItemTemplates

Dmitry Pavlov

Check your files in Solution Explorer are still set to ZIpItem/ZipProject in 'Build Action' property.




Re: Visual Studio Extensibility ZipItem and ZipProject not longer generating ItemTemplates

learnerplates

Hi Dmitry,
Yes they sure are. I tried changing the directory from Items to ProjectItems but to no avail.
This worked up until last week I'm nearly sure, it definitely worked as I have copies of the zip files! the error message makes no sense to me at all

<ItemGroup>
<None Include="GalaxyDevenv8.0.reg" />
<None Include="GalaxyDevenv8.0Exp.reg" />
<None Include="Key.snk" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<ZipItem Include="Templates\Items\Load\Load.gt" />
<ZipItem Include="Templates\Items\Load\GalaxyIcon32x32.ico" />
<ZipItem Include="Templates\Items\Load\GravityLoad.vstemplate" />
<ZipItem Include="Templates\Items\Panel\GalaxyIcon32x32.ico" />
<ZipItem Include="Templates\Items\Panel\Panel.gt" />
<ZipItem Include="Templates\Items\Panel\GravityPanel.vstemplate" />
<ZipItem Include="Templates\Items\Save\Save.gt" />
<ZipItem Include="Templates\Items\Save\GalaxyIcon32x32.ico" />
<ZipItem Include="Templates\Items\Save\GravitySave.vstemplate" />
</ItemGroup>






Re: Visual Studio Extensibility ZipItem and ZipProject not longer generating ItemTemplates

Dmitry Pavlov

Hi Niall,

The error you mentioned is the result of checking the condition here: C:\Program Files\Visual Studio 2005 SDK\2007.02\VisualStudioIntegration\Tools\Build\Microsoft.VsSDK.targets (line 257). As I can see there is nothig may causing such error for your project file - strange..

So there is an additional suggestion:

- make sure that <VsTemplateLanguage>YourValueHere</VsTemplateLanguage> in your .csproj file is the same as

<ProjectType>YourValueHere</ProjectType> in your .vstemplate files

P.S. but my suggestion can't be a reason for error you mentioned. It seems that something is broken outside your project.






Re: Visual Studio Extensibility ZipItem and ZipProject not longer generating ItemTemplates

learnerplates

Yes Dmitry, I had thought that the language could be a problem but it is the same in all files, I think that would only break the templates in the cache anyway.

Yes I think this maybe something outside my solution, the only thing I've changed is that I now use the PLK and I've now put the VSPackage assembly in the GAC, that should have an affect on MSBuilds Zipfiles!
Looks like a reinstall of the SDK is required!






Re: Visual Studio Extensibility ZipItem and ZipProject not longer generating ItemTemplates

learnerplates

This is very very strange, it's not the SDK, I reinstalled on my own machine and installed on another machine and rebuild the solution, same result no ItemTemplates!!
But I've also reverted back to an older codebase, same thing.
I've even uninstalled the assembly from the GAC to be sure.

Dunno what the deal is here, if it's not the solution and not the SDK, what could it be
Great way to spend a day thoughSad






Re: Visual Studio Extensibility ZipItem and ZipProject not longer generating ItemTemplates

Dmitry Pavlov

Yes, looks like that.




Re: Visual Studio Extensibility ZipItem and ZipProject not longer generating ItemTemplates

Dmitry Pavlov

I use Virtual PC 2007 with clear OS and VS2005 + VSSDK installed to test such artefacts.

From my point of view, your problem is a good candidate for such testing.






Re: Visual Studio Extensibility ZipItem and ZipProject not longer generating ItemTemplates

learnerplates

Sure Dmitry but in this case I do not think it'll make a difference as I've already tried it on a second machine with the same results.
The second machine required an installation of the SDK and I also rebuilt my solution on it from scratch.
I'll give it a go.
My Package is completely useless nowSad






Re: Visual Studio Extensibility ZipItem and ZipProject not longer generating ItemTemplates

Dmitry Pavlov

Are you using any version control system If yes, maybe you need look through the changes from the last week when your package works Ok




Re: Visual Studio Extensibility ZipItem and ZipProject not longer generating ItemTemplates

learnerplates

Yes i'm using SourceSafe, I tried getting a version from a few weeks ago but no fix. I'm nearly positive that version worked which led me to the registry, maybe the registry or something is at fault, I also unregistered my package and still no go.

Do you know what the error is checking for and throwing a error for I tired removing the condition from the .targets file but then other conditions fail.






Re: Visual Studio Extensibility ZipItem and ZipProject not longer generating ItemTemplates

Dmitry Pavlov

To be honest, I don't think that changing .targets file is a good idea.

Try to completelly reset Exp registry hive before. That is a command doing that:

  • "C:\Program Files\Visual Studio 2005 SDK\2007.02\VisualStudioIntegration\Tools\Bin\VsRegEx.exe" GetOrig 8.0 Exp





Re: Visual Studio Extensibility ZipItem and ZipProject not longer generating ItemTemplates

learnerplates

Thanks Dmitry I've tried that but to no avail.

It's the creation of the .zip template files that's failing and not their registration what type of checks are done before the .zip files are created
One requirement would be the name of the Package as this is how MSBuild would know where to copy the .zip files to in the Visual Studio intallation i.e. C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ItemTemplates\<mypackagename>

In my case the .zips aren't even being created in the intermediate directory <mypackageproject>\obj\debug, so there's no way they could ever make it to the VisualStudio installation directory. What could be causing this that MSBuild does not know the name of my package and fails.

I've found a copy of the .zip templates and copied them into the Visual Studio installation directories manually and reset the hive and ran RegPkg, all works, this proves that the Package and Template names are correct!







Re: Visual Studio Extensibility ZipItem and ZipProject not longer generating ItemTemplates

Dmitry Pavlov

Hi Niall,

I've descibed the VS SDK template handling mechanism in this post.

Hope it will give you some pointers related to your case.






Re: Visual Studio Extensibility ZipItem and ZipProject not longer generating ItemTemplates

learnerplates

Hi Dmitry,
That thread clears things up alright. I was just looking at those regpkg attributes earlier, the ProjectTemplatesDir setting didn't make much sense to me for sure, I'm glad to see it's not used.

If that's all that's required then I'm stuck however, as I've said my VsTemplateLanguage and my ProjectType are the same, this is compounded by all working when I manually copy the templates into the Visual Studio installation. But my source project still will not generate the zips!