boo-lang / boo

The Boo Programming Language.
BSD 3-Clause "New" or "Revised" License
874 stars 148 forks source link

Adding auto-generation of TargetFrameworkAttribute for Boo project like it is done in C#. #75

Closed MaximTrushin closed 11 years ago

drslump commented 11 years ago

It's not working correctly for me under Mono, perhaps it's an issue with xbuild not being as capable as msbuild. The temporary file is generated in the sources directory and is not being interpolated, it ends up as a file named $([System.IO.Path]::.....

I think it shouldn't call TargetFrameworkMonikerAssemblyAttributesPath, the default operation for that task should be enough. Just by redefining TargetFrameworkMonikerAssemblyAttributeText to be something with Boo syntax the compiler won't choke on it :)

MaximTrushin commented 11 years ago

@drslump I thought that target GenerateTargetFrameworkMonikerAttribute is absent in the mono's version of Microsoft.Common.targets so it will not impact build process in mono. I added TargetFrameworkMonikerAssemblyAttributesPath because I needed to override extension of the generated file. It will have extension ".cs" otherwise. It will create conflict in .NET environment because this file is shared between all project targeting .NET 4 and it will be used by Visual Studio for example in the C# project. If I understand correctly it doesn't get overwritten every time the project is compiled. Instead, once it is created it will be used by all projects forever.

drslump commented 11 years ago

@MaximTrushin I'm going to send a new pull request, please check if they work in a proper windows environment.