locked
Error : The type name 'Diagnostics' does not exist in the type 'Company.Language.System' RRS feed

  • Question

  • Hi,

    I am currently developing a dsl project. However when I try to compile it I get the following error.

    Error 1 Metadata file 'd:\users\administrator\documents\visual studio 2010\Projects\Language\Dsl\bin\x86\Debug\Company.Language.Dsl.dll' could not be found DslPackage
    Error 2 The type name 'Diagnostics' does not exist in the type 'Company.Language.System' d:\users\administrator\documents\visual studio 2010\Projects\Language\Dsl\GeneratedCode\SerializationHelper.cs 26 11 Dsl
    Error 3 'Company.Language.System' does not contain a definition for 'Xml' d:\users\administrator\documents\visual studio 2010\Projects\Language\Dsl\GeneratedCode\SerializationHelper.cs 488 70 Dsl
    Error 4 'Company.Language.System' does not contain a definition for 'Diagnostics' d:\users\administrator\documents\visual studio 2010\Projects\Language\Dsl\GeneratedCode\SerializationHelper.cs 1146 11 Dsl
    Error 5 The type name 'Collections' does not exist in the type 'Company.Language.System' d:\users\administrator\documents\visual studio 2010\Projects\Language\Dsl\GeneratedCode\SerializationHelper.cs 1157 11 Dsl
    Error 6 The type name 'Text' does not exist in the type 'Company.Language.System' d:\users\administrator\documents\visual studio 2010\Projects\Language\Dsl\GeneratedCode\Serializer.cs 8449 11 Dsl
    Error 7 The type name 'Text' does not exist in the type 'Company.Language.System' d:\users\administrator\documents\visual studio 2010\Projects\Language\Dsl\GeneratedCode\Serializer.cs 8528 11 Dsl

    Does anybody know what is the problem here ?? PLEASE HELP

    Thanks in Advance

    Balachan


    Sunday, October 5, 2014 8:32 AM

Answers

  • Balachan,

    From the look of the error messages, your language has the namespace "Company.Language.System". Having "System" in your namespace is causing the compiler to try to find all of the .Net Framework "System.XXX" types in your project rather than looking in the .Net Framework assemblies.

    Try changing the namespace of your model:

    * open the DSL definition

    * change the "Namespace" property of the model to e.g. "Company.Language.SystemX"

    * save the model

    * transform all of the templates (Build | Transform All T4 Templates)

    The project should now build correctly.


    Regards,

    Duncan

    Thursday, October 9, 2014 7:58 AM