Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to get rid of "Select WPF Design Time Culture"

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Globalizer Support
View previous topic :: View next topic  
Author Message
Dierk Droth



Joined: 16 Nov 2010
Posts: 27

PostPosted: Wed Nov 17, 2010 3:40 pm    Post subject: How to get rid of "Select WPF Design Time Culture" Reply with quote

Hi,

Is there a way to get rid of the "Select WPF Design Time Culture" icon in the system tray. Thing is, it's active on all dev machines of our team although only I have Globalizer installed. We don't need that since all UI design is the default language (which is English for us).

Thanks in advance
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Nov 17, 2010 9:21 pm    Post subject: Reply with quote

You could download the source code for the Infralution.Localization.Wpf assembly from codeproject and modify it so that it doesn't display the tray icon.

Just comment out the following lines from ResxExtension.GetValue method:

Code:
if (this.IsInDesignMode)
 {
     CultureManager.ShowCultureNotifyIcon();
  }


Use your custom assembly on the other developers machines.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Dierk Droth



Joined: 16 Nov 2010
Posts: 27

PostPosted: Tue Nov 23, 2010 8:19 am    Post subject: Reply with quote

Thanks for your suggestion. We'll look into and will get back to you in case.
Back to top
View user's profile Send private message
Dierk Droth



Joined: 16 Nov 2010
Posts: 27

PostPosted: Fri Dec 03, 2010 7:51 pm    Post subject: Reply with quote

I incorporated the sources in our project.

Now every time I run Globalizer on our project I get this warning:
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3243: No way to resolve conflict between "Infralution.Localization.Wpf, Version=2.1.1.0, Culture=neutral, PublicKeyToken=null" and "Infralution.Localization.Wpf, Version=2.1.1.0, Culture=neutral, PublicKeyToken=91e893994f047aa1". Choosing "Infralution.Localization.Wpf, Version=2.1.1.0, Culture=neutral, PublicKeyToken=null" arbitrarily.

This only can be solved by removed the infralution project from the references on our project and add it back.

Any idea what's causing that issue?

Thanks
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun Dec 05, 2010 10:58 pm    Post subject: Reply with quote

I've just downloaded and compiled the Infralution.Localization.Wpf source code from code project. I then used the current version of Globalizer.NET and created a workspace for the SampleApp project from the download.

I was able to scan and preview windows without any issue. I changed the source code so that it added a "%" to each string so I could verify that I was using the modified source code not the original assembly shipped with Globalizer.NET

One thing I note from the error message you reported is that customized your assembly does not appear to have a strong name. Since the project in the codeproject download does have a strong name you must have changed this? This may potentially be the problem. Did you just download the project, make the required change and compile or have you made other changes?
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Dierk Droth



Joined: 16 Nov 2010
Posts: 27

PostPosted: Mon Dec 06, 2010 12:37 pm    Post subject: Reply with quote

I took the project folder "as it" and converted it to VS2010. Thus, I'm not aware of any changes regarding strong naming.

However, I just checked the project file and found that string name key file was not set. I now have set it to "StrongName.snk". We'll see...

I'll get back to you in case the issue persists.

Thanks for the hint.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Dec 06, 2010 9:28 pm    Post subject: Reply with quote

If your application has multiple projects/assemblies then you should also check that you haven't accidently left a reference to the original Infraluation assembly on one of them. If you are still having a problem it might be worth trying to change the assembly version so that it is also different to the Infralution assembly (eg make it 3.0.0.0).
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Dierk Droth



Joined: 16 Nov 2010
Posts: 27

PostPosted: Tue Dec 07, 2010 7:15 am    Post subject: Reply with quote

Thanks.

I'll keep you posted in case the issue persists.
Back to top
View user's profile Send private message
Dierk Droth



Joined: 16 Nov 2010
Posts: 27

PostPosted: Thu Dec 09, 2010 11:34 am    Post subject: Reply with quote

Unfortunately the issues persists: there still are situations where after running Globalizer (and believe as Globalizer needs to touch the VS project file) I get that warning.

What could be done to resolve the issue?

Thanks
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Dec 09, 2010 10:13 pm    Post subject: Reply with quote

I've tried again to replicate the issue you are having. This time I converted the Infralution.Localization.Wpf and sample project to VS2010/.NET 4 (because that is what you are using) and again created a workspace. I was able to scan the project, add new WPF windows and scan again and did not see the issue you are having.

Where is the error you are getting displayed - in the Globalizer.NET output window or a separate error dialog? Can you email a screen shot to support@infralution.com?

Do you get the error when running your app or only in previewing?

Quote:
there still are situations where after running Globalizer (and believe as Globalizer needs to touch the VS project file) I get that warning.


What do you mean by "running Globalizer"? Do you mean scanning or building or previewing? Are you able to fix the issue by then doing something? If you can give us more exact details of what you are doing when the error occurs that might help. Even better would be if you could put together a small project that demonstrates the problem you are having and send it to support@infralution.com.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Dierk Droth



Joined: 16 Nov 2010
Posts: 27

PostPosted: Fri Dec 10, 2010 10:20 am    Post subject: Reply with quote

Here is my setup:
- VS 2010 .NET 4
- solution holds a WPF project and the Infralution.Localization.Wpf project
- WPF project holding the Infralution.Localization.Wpf project as reference

I believe I can reproduce like this:
- create a WPF window in the WPF project and save
- start Globalizer using the existing workspace which manages the resources for WPF project above
- Globalizer->Workspace->right click->Scan whole project
- translate all new resources
- Globalizer->workspace->right click->build->source localization->all languages
- terminate Globalizer (save Globalizer workspace)
- switch to VS->it would ask to reload the WPF project
- rebuild the whole solution

-> you then should get the warning in the VS output window
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Dec 10, 2010 11:19 pm    Post subject: Reply with quote

Thanks for your detailed description it helped me finally replicate the issue. The problem arises because you are including the Infralution.Localization.Wpf project in the same solution and using a project reference to it. Project references are handled quite differently by Visual Studio to normal assembly references and so Globalizer.NET is not seeing this reference and assumes that it needs to add the reference to the Infralution.Localization.Wpf assembly.

The solution is to remove the Infralution.Localization.Wpf project from your Visual Studio solution and just add a normal assembly reference to the assembly built by the the project. You will need to exit and reopen Visual Studio after removing the project - before adding the assembly file reference.

Actually it is generally better to use a normal assembly references for assemblies that define WPF extensions because Visual Studio has to load the assembly into its own application domain for the designer to use. Using a completely separate assembly and re-opening Visual Studio (forcing it to reload the assembly) when you change it - avoids confusion which can otherwise occur where the designer is actually using an older version of the assembly then what you think.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Dierk Droth



Joined: 16 Nov 2010
Posts: 27

PostPosted: Sat Dec 11, 2010 8:28 am    Post subject: Reply with quote

Thanks for isolating.

That's odd. It would have been nice to have all in one project Crying or Very sad
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Globalizer Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group