Category: XML

  • Visual studio project configuration file settings priority

    csproj in explorerTHE PROBLEM
    For multiple versions (Dev, Test, Prod) of a single ClickOnce application one has to name assemblies differently. In this way you can have all three versions on the same computer. This can be easily achieved by using configuration in Visual Studio. The problem I had was that no matter what the assembly name I specified in the configuration, it would not use it during build.

    SOLUTION
    The problem was hidden on the bottom of the “application.csproj” file. All the properties of each configuration were placed on top of the csproj file and the bottom parameter was always setting like a default value.

     
    .
    .
    .
    <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
       <OutputPath>bin\Release\</OutputPath>
       <DefineConstants>TRACE</DefineConstants>
       <Optimize>true</Optimize>
       <DebugType>pdbonly</DebugType>
       <PlatformTarget>AnyCPU</PlatformTarget>
       <ErrorReport>prompt</ErrorReport>
       <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
       <AssemblyName>Application Test</AssemblyName>
       <ProductName>Application Test</ProductName>
       <InstallUrl>https://localhost/install/</InstallUrl>
       <PublishUrl>C:\Deploy\</PublishUrl>
       <UseVSHostingProcess>false</UseVSHostingProcess>
    </PropertyGroup>
    .
    .
    .
    <PropertyGroup>
       <AssemblyName>Application</AssemblyName>
    </PropertyGroup>
    .
    .
    .
    

    Just remove the bottom PropertyGroup and your configuration setting will be applied at build time. Don’t forget to always reload the project when you change the configuration file, as visual studio always reads it only at project load.

    PS: To edit the csproj you must first unload the project. Then you can right click on it and choose edit. (or use a text editor in explorer)

  • Xades standards testing portal

    I just found out a great portal about xml digital signature xades standard testing tool, with detailed information on what is wrong. You just need to send a free email to get the login credentials and you are good to go. They replied to me the next day.

    The link is located at ETSI site: http://xades-portal.etsi.org/pub/index.shtml

    There is a link (lower left part) to the Xades baseline checker online tool which is the final target:http://212.234.160.9/pub/index.shtml. I hope the ip doesn’t change.

    Have fun!