VS 2008 WinForms with SourceSafe - winforms

We are using Visual Studio 2008 to develop a winforms application stored in Visual Source Safe 2005.
If one of our team members changes a *.Designer.cs file without changing the form's source file the change doesn't appear during a "Get" operation. However, if in Visual Studio you run a compare on the *.Designer.cs file the differences are displayed in the difference viewer.
FYI: We are using the default Microsoft Visual SourceSafe plug in for Visual Studio.
Any ideas why the "Get" operation will not detect changes in the *.Designer.cs files and suggest we pull down the latest version?
Thanks for your help!

Designer files are not intended for manual manipulation. One of the chief incentives for adding partial classes to the popular .Net languages was to segregate the designer-generated code from manual user code, in fact. Manual manipulation of repeatedly-generated code (in pretty much any environment, not just visual studio) is asking for headaches.
What changes are you making to the designer file, and why is it not possible to make those changes to the non-designer source file?
Edit:
Is the project in the IDE properly bound and connected to the source control database (via File->Source Control->Change Source Control)? It should automatically be checking out the designer files when changes are made in the designer view.

I would try doing a Get manually through VSS Explorer (i.e. not through Visual Studio) and see if it works. If not, check to see if the file is pinned to a previous version.

Woe unto you for having to use SourceSafe. At my last job, we used SourceSafe and had a myriad of problems with it. We switched over to Surround SCM and were really happy with it. I'd never heard of it before that job.
To answer your question, any time I ran into a problem like this with SS, I'd do a "forced get": in the options dialog when you get latest, tell SourceSafe to get the latest version from the server regardless of whether it thinks the file is up to date.
Edit: I think the issue is the VS200X plugin for VSS. If you have the VSS standalone application you should be able to do a forced get from there. I now remember having to do this so often that I stopped using the VS200X plugin.

Related

Visual Studio ReportViewer Designer Version

I'm moving my old project to Visual Studio 2017 [from 2015], but whenever I try to edit a RDLC report in VS it updates my report version and makes it incompatible with 'Microsoft.ReportViewer.WinForms' version 10.0 using 12.0.
The thing here is that I need to keep the version, because every user has the v10.0 DLL aside the project so I could not update everyone at once.
I tried to embedded that DLL into the executable but it says this:
Cannot embed interop types from assembly
'Microsoft.ReportViewer.WinForms, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=89845dcd8080cc91' because it is missing the 'Guid'
attribute
Any help or workaround would be appreciated, thanks in advice.
For anyone wondering how to do this, I didn't found a workaround.
Instead I decided to upgrade to latest ReportViewer version [10.0 -> 14.0] as it has retrocompatibility, it can read older reports and I don't have to upgrade them.
In other hand for the fact that I have several user installations with the DLL in the same folder of the executable, I have an automatic tool which allows me to update any assembly without much effort. This tool is made by me, so I can't tell how to do it other way.

VS Specify WinForm open order

I have an already created project with plenty of WinForms and specified StartUp project.
I'm creating a new form in a different project and wanted to know if there is a proper way to set a specific form load order post debug start.
Is there a some kind of a configuration for that or some checkbox for that, or maybe I'm just asking a really trivial question with an obvious answer (which I didn't find on my own)?
I'm running this projects on Visual Studio Express 2015 Desktop.
Thank you for any suggestions.

Can Surface SDK run on Visual Studio 2012?

I need to create a WPF app using the Surface SDK. I am using Visual Studio 2012, and according to this SO post, VS2012 doesn't allow that. However, since this was posted before it was officially released, I want to make sure I'm not missing something.
I just need a few of the touch/swipe controls that come with it. Is there a different option for VS2012? The other developer is using 2010, so it needs to be able to still run on his machine. It's a very simple app that I just need to hammer out, so I'm looking for the fastest, easiest method. Both of us and the end application is to run on Windows 7.
I found an easy solution by which it seems to work. It does expect you to have Visual Studio 2010 installed. Following the following steps I managed to compile in Visual Studio 2012 using .NET 4.5. TouchDown events work. I tried it out on some small projects and they seem to work perfectly fine.
Use Visual Studio 2010 to set up a Surface project.
Safe and close Visual Studio 2010.
Open the solution using Visual Studio 2012.
Change the target framework under project settings to .NET 4.5.
Save as a new solution file.
Compile, ... everything works!
This method prevents you from having to set up all the configuration files/references yourself. The only downside is you don't have any of the Surface tools integrated into the IDE. E.g. the toolbox, project templates, ... This of course doesn't prevent you from writing plain XAML yourself.
If for some reason this doesn't work in the long run I will update this post.
The easiest way will unfortunately be for you to run VS2010.
Currently the SDK is not supported in VS2012, for a few reasons.
Notably, the way that touch works in Win8 is a lot better than in previous versions of Windows. This unfortunately meant a rewrite of the touch layer that the Surface SDK uses. The new controls are written to adapt dynamically based on mouse/touch input, making the Surface SDK controls a bit redundant.
Microsoft might make the SDK available for VS2012 in the future, but this is kind of debatable.
If you are still dead set on giving it a shot, download an application called Orca (http://msdn.microsoft.com/en-us/library/windows/desktop/aa370557(v=vs.85).aspx) and edit the SDK installer file, removing the dependency on VS2010.
This is how I got the Surface 1 SDK to work with VS2010, since it was targeting VS2008 (note that it still has not been updated to work with VS2010)
Let me know how you go.

Can't revert winforms project to .net 3.5

I have been unable to revert a winforms project from .net 4 back to .net 3.5 due to bugs in visual studio 2010. The program manager says in a forum it was not a design goal to permit round trip development to previous versions (!). The error is in the resx files:
error RG0000: Object reference not set to an instance of an object.
http://connect.microsoft.com/VisualStudio/feedback/details/557469/visual-studio-2010-generates-invalid-assembly-in-some-cases
"This is the intended way in which the product was designed. And, we do not support round-tripping with previous versions of the product. As such, I am resolving the issue, "By Design"."
I tried manually editing a resx file back to 3.5 and couldn't do it. Any suggestions for this appreciated.
Assuming you haven't got a previous version for what ever reason, the simplest solution would be to delete the .resx files and recreate them in the 3.5 version of the project. Take a copy of the project so you can open the offending .resx files and copy the resources to the clipboard. Pasting them back into the 3.5 version should just paste the content.
Get the last working version just before you did the upgrade from source control. You do use source control right?

WPF deployment strategy dilemma.clickonce(limited customization)+autoupdate vs installer(unlimited costomization) no autoupdate

I've been facing a deployment problem.I've built a WPF application with visual studio 2008 and created an installer(msi) which works fine.But then it's pain to add automatic update to it. i've seen this article at windowsclient.net but it seems to be pretty old but could have been the perfect thing for me.Then i looked at the .Net Application updater block v2.0 which uses enterprise library june 2005 and for some reason it's not installing on my machine.
I thought i will need to use a more recent Enterprise library so i installed and compiled Enterprise 4.1(october 2008) but nothing better happened.To i decided to give a try to CLickonce deployment.After struggling with it, it was almost perfect.I realized that when i was testing the updates provided by the clickonce on my machine which is XP i didn't notice the need of having sqlite dll in the GAC. surely it was already there.I noticed it when i moved to vista that there is a problem.After checking the net i know it's impossible to add a dll to the Global Assembly Cache.
Now i'm stuck, i think i've hit a wall.Can any one share some of his experience? I'm willing to try the updater block if i can get help.
Thanks for reading this!!
(Won't fit in a comment)
Here's something helpful -- you can deploy the SQLCE dll's locally, instead of installing as a prerequisite, which makes it easier to deploy. Check out this article.
This is another useful article: how to keep your data safe from ClickOnce updates.
This will make more sense if you check out this thread. I have a post in this thread that has two links in it. One points to the ClickOnce way of handling database deployment, the other to a thread that is essentially the same as the blog article above.
First, you can't use that updater block. It was for .NET 1.1. It was marked obsolete when ClickOnce deployment was added in .NET 2.0.
You probably don't need to install that dll in the GAC. In many cases, you can just include it in the deployment, and it will find the local reference and use it. It just depends on the dll. So here's what I recommend you try:
Add the dll to your project. Set the 'build action' to 'none'. Set 'copy to local directory' as 'do not copy'.
Delete the reference in your project to that dll, and re-add it. But instead of picking it from the GAC, browse to the one you just added to your project and select it. On the reference properties, set 'copy local' to 'true'.
Now when you run it, it will access the local copy instead of looking for one in the GAC.
Like I said, this works great in some cases. It works for SQLCE and DirectX, but not for something like Infragistics. Some assemblies really do have to be installed in the GAC. The only way you will know is if you try it.
If you DO end up having to put it in the GAC, you can create an MSI to do that and deploy it as a prerequisite to the ClickOnce application. So you can still use ClickOnce for your main app.

Resources