Build Error?

Mar 28, 2010 at 11:18 PM

I cloned 124501857e17 and setup up the build environment but I am getting a build error - since I got I am working from the source, got the error so quickly and am not familiar with MCompilerCore I thought I would post the error and see if there is something obvious I am missing (or if I just need to get to work trouble-shooting this if I want it to build!).

The build error information is below - I can post all build output if helpful -

Thanks for any information!!

Charles Miles

MetaSharp.Transformation.CodeDom -> C:\Users\cmiles\Documents\Scratch\MetaSharp\src\build\-\MetaSharp.Transformation.CodeDom.dll
Done Building Project "C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\codedom\MetaSharp.Transformation.CodeDom.csproj" (default targets).
Project "C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\Builder\MetaSharp.Transformation.Builder.csproj" (3) is building "C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj" (7) on node 1 (default targets).
PrepareForBuild:
Creating directory "obj\-\".
MCompileCore:
Compiling to obj\-\MetaSharp.Transformation.Templating.mx...
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : System.InvalidOperationException: The compiler encountered an internal error and cannot continue. Please contact support. ---> System.ArgumentException: An item with the same key has already been added. [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer) [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at Microsoft.M.Semantics.Imported.ImportedLanguageDeclaration..ctor(Identifier name, ISourceLocation location, Boolean caseSensitive, IEnumerable`1 members, Language language, Reference reference, IModuleDeclaration definingModule) [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at Microsoft.M.Services.TC5SemanticGraphImporter.ImportLanguage(Language language, ImportedModuleDeclaration module) [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at Microsoft.M.Services.TC5SemanticGraphImporter.ImportAsModuleDeclaration(INamed named, ImportedModuleDeclaration module) [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at Microsoft.M.Services.TC5SemanticGraphImporter.ImportModule(Module module) [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at Microsoft.Internal.MethodInfoExtensions.FuncCastingStub`6.Call(T1Sig t1, T2Sig t2) [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at Microsoft.M.TermDispatcherFunc`4.Invoke(TDiscriminator discriminator, T1 arg1, T2 arg2) [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at Microsoft.M.Services.TC5SemanticGraphImporter.Import(ISymbolTerm term) [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at Microsoft.M.Services.TC5SemanticGraphImporter.ImportModuleDeclarations(MImage image) [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at Microsoft.M.Services.TC5SemanticGraphImporter.ImportImages(IEnumerable`1 images, Boolean importingStandardLibrary) [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at Microsoft.M.Services.TC5SemanticGraphImporter..ctor(IEnumerable`1 images, Boolean importingStandardLibrary) [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at Microsoft.M.Compiler.TC5SemanticAnalyze(CompilerOptions options, CompilationResults results) [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at Microsoft.M.Compiler.CompileProgram(CompilerOptions options, CompilationResults results) [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at Microsoft.M.Compiler.Compile(TargetTypes targets, CompilerOptions options) [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at Microsoft.Internal.Driver.DriverBase.Compile(TargetTypes targets, CompilerOptions compilerOptions) [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : --- End of inner exception stack trace --- [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at Microsoft.Internal.Driver.DriverBase.Compile(TargetTypes targets, CompilerOptions compilerOptions) [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
C:\Program Files\MsBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets(95,5): error : at Microsoft.M.BuildTask.MCompilerDriver.Run() [C:\Users\cmiles\Documents\Scratch\MetaSharp\src\Transformation\templating\MetaSharp.Transformation.Templating.csproj]
---Inner Exception Details---

 

Coordinator
Mar 29, 2010 at 1:05 PM

First off you have to make sure you have the latest Sql Server Modeling Services drop.

And then I totally forgot this but there is a hack in the M files you have to make to get it to build right. This is incredibly lame I know but there was no fix provided by the Oslo team.

Go to:

C:\Program Files (x86)\MSBuild\Microsoft\M\v1.0\Microsoft.M.Embedded.targets

Line 119, remove: References='@(ReferencePath)'

There is a bug in their build task which doesn't allow you to build unless that is commented it. (This is one of the main reasons why I'm building my own grammar, this type of bug is telling me mgrammar isn't going to be supported as a first class library).

Sorry!

Coordinator
Mar 29, 2010 at 1:11 PM

I updated the build wiki page to include that information, sorry for the trouble!

Mar 29, 2010 at 2:02 PM

Thanks for the quick update - I am glad I asked, I think that would have taken me quite some time to find - building without errors now!

BTW - I installed the Sql Server Modeling Services about four days ago and the line number of " References='@(ReferencePath)'" was 110 rather than 119. The line is easy to find and the instructions are clear, just thought I would let you know in-case the 119 is a typo or the file has been updated or...

Thanks!

Coordinator
Mar 29, 2010 at 3:19 PM

ok thanks.

Coordinator
Apr 11, 2010 at 7:03 PM

Btw, the latest codebase no longer has a dependency on MGrammar or Oslo so this problem is now obsolete.