Recently I upgraded a project of mine (the Dimecasts code base) to use VisualStudio 2010. In the process everything worked just fine from the IDE, but when I tried to compile it from the command line I would get the following errors:
Error MSB4064: The "Retries" parameter is not supported by the "Copy" task.
Error MSB4063: THe "Copy" task could be initialized with its input parameter.
After a bit a googling I came across a post which (and of course i cannot find it now) said that if you open up your .proj files and change the line that pointed to the v10.0 build of web applications and reset it back to 9.0 everything would compile. And this did work... BUT when you try to open that project up again in VS 2010 it will simply revert your changes... this is not a working solution.
Next I decided to switch my target framework in Nant from 3.5 to 4.0, but of course my nant.exe.config file does not support 4.0 yet. So after a bit more googling I found this post that gives details on how to add the missing values to the config file.
When I added the config information to my Nant.exe.config file things were better, but still not great. Now I was getting an error that said:
The "vendor" attribute does not exist, or has no value.
To resolve this I added the following under the <framework> node in my config
After this I got another error.... This time it said that .Net Framework 4.0 was not installed. But I know this is not valid. After looking at the information for a few more seconds I realized the issue. The example config from the post above was build on an older version of the 4.0 framework (.20506) and I have .30128.
I changed all values in the nant.exe.config value that was v4.0.20506 to be v4.0.30128 and NOW I am able to compile.
So long story short, if you are getting the MSB4064 error you need to do the following:
- Point nant to use the 4.0 framework tools
- Follow this post and copy the framework section to your Nant.exe.config file
- Add the missing 'vendor' attribute to the new framework section
- Update the version in the new framework section to match the version you have on disk (check C:\Windows\Microsoft.NET\Framework for versions)
- Compile again
Till next time,
02-27-2010 8:40 AM