Bug 559 - Code generated in msbuild task is not added to project
Summary: Code generated in msbuild task is not added to project
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: 2.4.2
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2011-08-31 00:29 UTC by Justin Chase
Modified: 2011-08-31 10:25 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
screen shot of error in build project (126.49 KB, image/png)
2011-08-31 00:29 UTC, Justin Chase
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_ON_ROADMAP

Description Justin Chase 2011-08-31 00:29:20 UTC
Created attachment 218 [details]
screen shot of error in build project

I have a custom msbuild task that is generating .cs files based on dsl input files. The paths to the files are added to an output variable then added to @(Compile) items. When building via VS or command line these files are compiled into the assembly as expected but when building in monodevelop they do not appear to be compiled into the assembly correctly.

The exact repro is a little complicated but you can get it by getting my project meta#:

hg clone:  https://hg01.codeplex.com/metasharp
hg update: 515:7710d850f211
steps
1. open src/MetaSharp.Mono.sln
2. rebuild all
3. use decompiler to examine src/MetaSharp.Transformation/bin/Debug/MetaSharp.Transformation.dll

expected:
Type MetaSharp.Transformation.Grammar.GrammarParser to exist and MetaSharp.Build project should compile without errors.

actual:
Type is missing and build project reports an error.

I would be happy to help investigate this further any way I can.
Comment 1 Mikayla Hutchinson [MSFT] 2011-08-31 08:19:21 UTC
Did you enable the experimental mabuild/xbuild build engine in MD prefs? If you don't, it'll use the old built-in engine, which only supports a subset of MSBuild.
Comment 2 Justin Chase 2011-08-31 09:04:27 UTC
I just went into the Options dialog and enabled it under the Build settings. It appears to have the same effect. Do I need to make a different task? Or is it somehow in my .targets files or something else?

Where can I find some documentation on xbuild? Searches don't seem to be helping.
Comment 3 Mikayla Hutchinson [MSFT] 2011-08-31 09:08:27 UTC
After changing that option, you need to restart MD. If you look in the build output, you'll then see the output from MSBuild.

xbuild is Mono's implementation of MSBuild. The long-term goal is to have MD use MSBuild (on .NET) and xbuild (on Mono) as its build engine, but it's still somewhat experimental, and disabled by default.
Comment 4 Justin Chase 2011-08-31 09:18:32 UTC
Actually, it seems that I just needed to restart and try again because now it
appears to be working! Thanks.