I'm working on internationalizing a website. I followed the instructions on how to create them but the .properties files are empty. Any hints about what the problem might be?
thanks
clem
You don't need to create properties files in the first place. You specify multiple languages in the database properties and Domino Designer will create and populate the properties files for you on save of an XPage or project rebuild. You only need to manually create property files if you want to use them from code with your own messages.
Related
So that every time I create a project using the libraries I usually use I won't have to manually add the sheet.
You can do this, but I advise against it. Main reason being it will make your project files unusable on other machines unless you also force your solution on them. Second reason you cannot expect all your projects ever are going to use the same libraries/versions/configurations of those libraries so after a while it might become unmaintainable.
You are imo better of creating a small utility which copies a project from a template you create with all imports and then changes guid and project name. Or create a template for VS which does that.
Anyway: a possible solution is to add an msbuild file which imports all default property sheets you need into the $(VCTargetsPath)\Platforms\Win32\ImportBefore\ directory (create it if it doesn't exist). The file has to have a .targets extension. More info here for example.
I'm using LLBL Gen Pro 3.5 command line (CLIRefresher and CLIGenerator) to create the solutions.
It automatically creates a AssemblyInfo.cs which contains this code:
AssemblyVersion("1.0")
I want to set it to another version while building the project. For example:
AssemblyVersion("2.1.0.234")
Question1: How can I tell LLBL to create the project with this version?
Question2: If it is not possible, how can I tell LLBL NOT to create this file, so I can add this file later using MSBuild?
A1: you can, through a custom template for assemblyinfo. It's bound in the file SD.TemplateBindings.SharedTemplates.templatebindings in the folder \Frameworks\LLBLGen Pro\Templates
You can define a new binding by creating a new templatebindings file, store it in the folder you define as 'AdditionalTemplates' folder in the project properties, and you should give that templatebindings folder a higher precedence than the one you're 'overriding' (or move it up in tab 2 on the code generator config dialog). See the SDK docs for details.
A2: It is possible, see A1. But here's the thing: this file is written once (done in the preset you're using to generate code). If the file exists the next time you generate code, it's left alone. This means that if you change it, e.g. by giving it a different version number, it won't be overwritten.
So while you could change the template easily, in this case it's not needed: you can do whatever you want with the file after it's been generated, it's not generated again.
(ps: please ask questions about LLBLGen Pro on our forums at http://www.llblgen.com/tinyforum, as we don't monitor stackoverflow that regularly. Thanks)
In Visual Studio 2010, I want to create a project template that includes links to two files that should exist on the system. One of them is a common AssemblyInfo.cs file. Another is the strong name key file (*.snk).
I need these references to be relative, because each developer's workspace will be set up differently. Is it possible for the project template to somehow figure out where these files reside in each developer's environment?
From reading about templates, it sound like they're pretty static so I wonder if tricks can be done to do something like this. If nothing else, I can add bogus references that will cause compilation errors and force the developer to hook these files in. But if I can do it for them, that would be better.
You should set the CreateInPlace property to true in the vstemplate. The documentation says
Specifies whether to create the project and perform parameter replacement in the specified location, or perform parameter replacement in a temporary location and then save the project to the specified location.
If you want relative paths to work, you need the parameter replacement to occur in the place where you're creating the project, not in a temporary location.
Microsoft have confirmed that this is a bug with the extensibility model and project templates. I managed to get round this by using IWizard. I added the following code in the RunFinished method of my IWizard implementation:
//Get linked file directory
string coreDir = Path.GetDirectoryName(MyProject.FullName);
//Data folder
ProjectItem propertiesProjectItem = slSharedProject.ProjectItems.Cast<ProjectItem>().Where(p => p.Name == "Data").First();
propertiesProjectItem.ProjectItems.AddFromFile(coreDir + #"\Service\TheFileIWantToLink.cs");
This code links in a copy of TheFileIWantToLink.cs file to my shared Silverlight project (slSharedProject).
You could try to integrate a Wizard into your Project Template and set the Paths to the linked files. If i remember right you don't have to create an User Inteface; you only have to specify the correct replacements in the replacementsDictionary and VS will replace the values in your Template File. See this or this for further information.
I'm currently implementing a vsix extension tool window which will soon need a database connection string for querying some data to display to the developer in the tool window. I'd like to make this connection string configurable by the developer. As the developer is unlikely to change the config settings often a file would be sufficient.
Is it possible to just use an app.config file in the same folder as the sln file and if so must I use some custom configuration settings to wrap the file? NuGet seems to implement this approach but I don't fully understand the internal architecture to see how the config file is used.
I'd appreciate any alternative approaches too.
Edit:
I have since realised that the dynamic data the config store would serve must be solution specific so that a tool window used in one solution can use different properties to that of another solution. I guess one possibility would be to use the .settings file to store the location of a single config file that itself stores information related to different solutions.
The best place to store settings for a .vsix extension is to use a .settings file. In order to create one do the following
Right Click on the project and select "Properties"
Go to the Settings Tab
Click on the link to create a default settings file
This will create a couple of files in your solution.
Settings.settings
Settings.Designer.cs
Additionally it will bring up a designer from which new settings can be added. These can be accessed afterwards by using the Settings.Default static property
Been there and in my opinion the built-in mechanism works best, detailed walkthrough: http://msdn.microsoft.com/en-us/library/ff460144.aspx
Adding a note from self I can see that the underlying implementation uses system registry subkey. However after VSIX extension uninstalled all the keys are removed automatically so your extension is not polluting the system leaving orphaned entries.
I tried to create a custom project template for setting up unit testing.
The problem is that when i create a new project based on this template it creates references to the template files :
When i edit a file, it changes my template files instead of my actual project files !
When i delete my template, files from my actual project becomes red !
The project template is in :
/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Project Templates/Application/Test-based Application
Reading some question on stack overflow i tried to install my template project in
/Library/Application Support/Developer/Shared/Xcode/Project Templates
But i cannot see my template when i create a new project.
Can anybody help ?
Thanks,
Vincent
You might be interested in my Xtemplate project on GitHub. It’s a simple script that will set up a new Xcode project with decent defaults, it features a unit testing target with OCMock.
there are several reasons but the most important is because your template info plist identifier is not unique! as you said you have put the template in /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Project Templates/Application/Test-based Application
and then moved the same template in other place. xcode has seen the identifier number in the first location and ignores the second. change the identifier and give it a try.
why dont you try the main template folder:library/developer/xcode/templates ?