Search code examples
.netcruisecontrol.netnant

CruiseControl.net build giving the error "The type or namespace name 'Properties' does not exist in the namespace" when I add resx resources


I am building a solution with NANT and CruiseControl.net. Everything worked fine, then I tried to add in resource files by going into properties and adding one through the resources tab. Now I am getting the error:

The type or namespace name 'Properties' does not exist in the namespace 'MyRootNamespace'

It builds and runs just fine on my local machine, but on our test server, this automated build is crapping out. Any ideas? Thank you.

EDIT: Does this require running Resgen.exe in CruiseControl somehow?


Solution

  • Adding a resource in this way to a project that does not yet contain any, will create an internal class Resources in the namespace MyRootNamespace.Properties. This class will be placed in a newly created file named Resources.Designer.cs This file will be created in the Properties subfolder. You will need to check this file in into your repository (together with the newly created resources.resx) in order for the build to succeed.

    By the way, I am assuming you are using C#, this might be different when you use VB.NET.