My project get disturbed oftenly when i get latest version in tfs 2010 - visual-studio-2010

I am newbie in TFS 2010.
I have installed TFS 2010 on server and successfully connected.
I am doing check in for comitting my changed file and get latest version from other computer. Most of the time it works fine but oftenly js or style file gets corrupt.
Suppose i have two systems connected to TFS on server.
System A
1- I do change in abc.aspx.
2- I check in.
3- I keep on working on system and edit 4 files.
4- I check in.
System B
1- I get latest version.
2- I get abc.aspx changed.
3- I am doing work on some other files.
4- I get latest version, from System A i receive change in 3 files where as 4th file remain same.
Some times the project gets corrupt in a way the design gets bad and aspx page disturbs.
I tried to find help on websites but there is not much tfs help available. Please guide me where i am wrong.

You may try to clean client and server caches. See http://www.ewaldhofman.nl/post/2009/07/06/Clear-the-cache-of-TFS.aspx

Related

How do I resolve a merge conflict when both server and local versions are wrong?

I am working in the enterprise on Visual Studio 2013 and Team Foundation Server. We have a test source and a production source, and I Get Latest on them both regularly. As there are only a few developers, we make changes directly in test, we don't have personal branches off of test (though when our shop was bigger, we did).
So I opened a file in Test, made a simple change to it, saved it, checked it into test, and published it to production. When I went to merge Test with production, I spawned a merge conflict. I am looking at the "server" version and the "local" version and neither one is correct. The "server" version is the file I edited, minus the edit I just made. That makes sense. But the "local" version is something I haven't seen before, what looks like perhaps an older version that I've never never worked on. Maybe this was my local copy and Get Latest didn't update it. But the local file I edited was exactly what I expected it to be.
So, what could cause that? How do I troubleshoot this problem? All I want is to get the correct version in TFS so it doesn't get blown away later, but I have no idea how to proceed.
This may due to when you do the get latest option, TFS didn't update the workspace correctly.
A clean way to do this, back up your file with changes, undo your pending changes. Delete the old workspace, create a new one. Get latest version from server for both test and production source.
Edit the specific file with changes, check it into the test, and finally do the merge Test with production again.

Best way to determine which party made code changes?

I have a scenario I am hoping someone will be able to help me think through and determine the best way to handle. The tools I am using are Visual Studio 2013 and TFS.
We had a developer leave our company abruptly, and he has a lot of code changes for a client project which were not yet checked in. We have the code base with his changes locally. We also have the client's TFS server with the latest code. I do not have documentation of his changes, so my goal is to find all the code changes he has made. Keep in mind I also do not have access to his machine, I just have access to the local code base which he was working on, which includes his changes.
I began by comparing his code with the client's code on TFS, and looking for changes. However the client has also made some changes to their code in the 2 months since this developer began working on this project. So within those two months he made some changes locally and the client also made some changes which were checked in on TFS.
When I compare his code to the latest copy of code on the server, I can see the differences, but I can't seem to tell who made the changes. If a method was modified, I see that different versions exist on TFS and in this local code, but I cannot tell who made the change. Did the client make the change to the code, and the newer version on TFS makes my version look out of date? Or did this developer make the change to the code, making the server code look out of date? As the changes done by our developer were not checked in, I do not have a history showing me who made the changes to the code. What would be the best way to determine the changes our local developer made?
So, to sum it up: I have compared his local code to server code, and have seen the differences, but the client has also made changes to code since he acquired it. So the differences between his code and server code could either be due to his changes or client changes, but I don't know which.
I see a few ways which could make your life easier, but it requires you to know which version your developer initially downloaded. With that version (Changeset, Label, Date) you can make a comparison against the local workspace and find all the changes to that version on the server.
Workspace version
You can initiate the diff from the commandline (as well as from Visual Studio, but command lines are much easier to post on Stack Overflow):
tf folderdiff c:\sources "$/TFSProject/Path/To/Sources;C12345" /recursive
/collection:http://your.client.tfsserver.com:8080/tfs/ProjectCollection
/view:different,sourceonly
In the place of C12345 you can either enter the Changeset number that was used to create the workspace on your developer's machine or the label (use Llabelname instead of Cnumber) or the (approximate) date (use D2014-12-20).
This will output a list of files that have changed locally against the version that was used to create the workspace. Now you can list each file individually using:
tf diff c:\sources\changedfile.cs /version:C12345
(or use the same version spec as above if you used Labels or a Date).
There is another option, if the workspace is still registered on the TFS server, and that is to compare against the workspace version:
tf folderdiff c:\sources "$/TFSProject/Path/To/Sources;Wworkspacename;owner" /recursive
/collection:http://your.client.tfsserver.com:8080/tfs/ProjectCollection
/view:different,sourceonly`
Followed by:
tf diff c:\sources\changedfile.cs /version:Wworkspacename;owner
You do not need to own the workspace in order to do this, but the server must still have a record for that workspace on the server. You can try finding the workspace using the command:
C:\Sources\>tf workspaces /owner:avanade-corp\jesse.houwing /computer:jessehouwing
/collection:http://your.client.tfsserver.com:8080/tfs/ProjectCollection
Collection: http://your.client.tfsserver.com:8080/tfs/ProjectCollection
Workspace Owner Computer Comment
----------------------- ------------- ------------ ----------------------------
JESSEHOUWING Jesse Houwing JESSEHOUWING
The example above would lead to:
tf folderdiff c:\sources "$/TFSProject/Path/To/Sources;WJESSEHOUWING;Jesse Houwing" /recursive
/collection:http://your.client.tfsserver.com:8080/tfs/ProjectCollection
/view:different,sourceonly
Create a shelfset
If you do have the option to get access to the system (even if logged on as a different user) you can take ownership of the workspace and create a Shelveset of the changes. You can then unshelve these changes on a more recent workspace and Visual Studio will prompt you to resolve merge conflicts. TFS will know which changes were made by the other party and will try to auto-merge the changes as best it can.

Sitecore Project - Localhost just hangs

I've been using this same Sitecore project, for more than 2 years now. Upgraded to Sitecore 7.0 this spring, and everything just ran like it should.
But yesterday, suddenly out of nowhere, i can't seem to run my project anymore. I'm using Visual Studio 2013 with IIS Express (64 bit). And when i try to build and run my site through localhost, it just hangs. I even tried to let it load for 1 hour+, but it still just loads with nothing happening.
I tried to debug it further with Fiddler, but nothing happens. I even tried to delete a bunch of important files, like web.config. But it still just loads forever, with no error.
If i create a new empty web project, i can start it through localhost instantly. So there must be something weird happening with my Sitecore project.
Does anyone have any suggestions for debugging this or have you ever experienced anything like it?
I've nearly tried anything.
I am not sure what version you upgraded from, but I would do the following (in order) to troubleshoot the issue:
Depending on what version you are upgrading from, you may have been running your app pool on .NET Framework v2.0 instead of v4.0, which is required for Sitecore 7. Open up IIS, go to your app pool for the site and make sure that it is correctly set to run on .NET v4.0 and not v2.0. If it was set to v2.0, change it to v4.0 and try access the site. If the issue persists or if the app pool was already running on v4.0 continue to the next step.
As implied in step 1, Sitecore 7 runs on .NET 4.5. If you are upgrading from an earlier version of Sitecore, it is possible that your site is compiled using an earlier version of .NET. Right click on your project files in Visual Studio, click on Properties->Application and make sure that the Target Framework for each of the projects is set to .NET Framework 4.5. If they were set to a different framework, change them, build your solution again, and then try to access your site. If they were already set to target .NET 4.5 or if the issue persists continue to the next step.
Double check the permissions on your site root. Make sure that NETWORK SERVICE and/or your IIS User has all of the necessary read and write permissions for the directory. If they do not, apply the permissions and try the site again. If the problem persists, continue to the next step.
Delete all of the Sitecore DLLs and the DLLs generated by your projects. Copy fresh DLLs from a clean download of Sitecore 7 back into your bin/reference directory and build your solution again. Try to access the site again. If the issue persists, then the problem is likely in temporary internet files or in a config. Continue to the next step if this is the case.
Delete your Temporary ASP.NET Files from the Framework and Framework64 folders found in the C:\Windows\Microsoft.NET directory. Note that you must go into the directory for the version of .NET that your app pool is running against and delete the contents of the Temporary ASP.NET Files directories. It may be necessary to stop your app pool when you do this. Try to access your site again and if the issue persists, move onto the next step.
Try replacing your web.config with the default from a clean download of Sitecore 7, but be sure to back yours up before-hand so that you do not lose customizations, as you will want to add them back in after. Try your site again. This time, you may get an error if something in your code is dependent on the web.config. It is a good thing if this happens, as it means that your site is now working and you have only to add back in your customizations to resolve the errors. If your issue persists, continue to step 7.
If your site is still hanging, try replacing all of your configs in the App_Config directory, one at a time, with their clean copies (excluding ConnectionStrings.config and DataFolder.config, if you are using them). Additionally, disable/backup and remove all custom configs or configs for modules that you have installed that are not Core to Sitecore. Try to access your site again. If necessary, resolve any config errors by merging your changes/re-enabling your configs one at a time until you find one causing the issue or until all errors are resolved.
If your issue continues, post your the Sitecore version you upgraded to, the version you upgraded from, and any modules you have installed as a comment on this post.

I get blank report after publish. Using Crystal Reports 13 ( Visual Studio 2012 IIS 7)

My reports are working perfectly on local machine. I mean when run from vs.net. The reports are not working even i deploy it to the same system. I tried different solutions but with no luck. I have checked multiple stack-overflow questions and their solutions but still i am stuck. Any help would be really appreciated.
Just after posting my question here at stack-overflow i found a blog which solve my problem. So this may help other people having trouble to view crystal report after publishing. As I wasted two days searching for a fix to this issue. At last I found the solution on the following Site Link
All the credit goes to the Original Author who made that blog. I just copy/past his/her steps
Solution
This issue does not occur in local but happens when you host the site on server in IIS. Actually the cause of the issue is that Crystal Report is unable to find the required JavaScript (JS) files to render the report in browser
Below are the steps to resolve the issue
Downloading and installing runtime for Crystal Reports 13 for Visual Studio 2010. (You might want to skip this step if you already did this before and your application is working locally).
Once the runtime is installed. Crystal Reports will install the required support files in the location of your local computer:
C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\crystalreportviewers13
Copy the entire Crystal Report Support folder C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\crystalreportviewers13 to your Website's SITE_ROOT\aspnet_client\system_web\4_0_30319 folder.
4) If you do not have a \aspnet_client\system_web\4_0_30319 folders in your website's root. Please create them manually and then copy the crystalreportviewers13 into it.
NOTE: You can just copy the entire aspnet_client folder and past it to the site's root. It will work
Solution
The solution is to work on IIS this way:
Copy aspnet_client folder from c:\inetpub\wwwroot folder to the new website root folder.
or (first one is easier, second one is better fro maintenance)
Create a virtual directory called aspnet_client that points to c:\inetpub\wwwroot\aspnet_client inside the new website
Problem analysis
It's possible to analyze the problem
using client tools (debug window of browser)
GET http://someserver:20080/aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/crv.js 403 (Forbidden)
GET
http://someserver:20080/aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/images/style.css 403 (Forbidden)
or server tool (IIS log , on WIN2003 is placed in %SYSTEMROOT%\System32\LogFiles\W3SVC###\ on WIN2008 C:\inetpub\logs\LogFiles\W3SVC###).
2011-03-28 13:00:49 W3SVC701536 95.228.38.41 GET /aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/images/style.css - 20080 - 192.168.1.2 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+Trident/5.0) 403 6 64 Errore!
2011-03-28 13:00:49 W3SVC701536 95.228.38.41 GET /aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/crv.js - 20080 - 192.168.1.2 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+Trident/5.0) 403 6 64 Errore!
Cause the problem
Crystal Reports runtime is installed, but your application is not running under default web site.
In both cases i found that crv.js and style.css some files were not served;
these files are placed by CR installer in wwwroot\aspnet_client folder, but for some reasons they cannot be reached;
In my case the reason is that i create a different website (port 20080) and aspnet_client folder is not placed inside that website
I can see that you use different versions of software and different configurations, but i think you have the same problem.
I just copied the app_client folder to the published code folder's root then it started working fine.

Visual Source Safe - Removing files from web projects

I'll try to make this as straight forward as possible.
Currently our team has a VSS database where our projects are stored.
Developers grab the code and place on their localhost machine and develop locally.
Designated developer grabs latest version and pushes to development server.
The problem is, when a file is removed from the project (by deleting it in VS2008) then the next time another developer (not the one who deleted it) checks in, it prompts them to check in those deleted files because they still have a copy on their local machine.
Is there a way around this? To have VSS instruct the client machine to remove these files and not prompt them to check back in? What is the preferred approach for this?
Edit Note(s):
I agree SVN is better than VSS
I agree Web Application project is better than Web Site project
Problem: This same thing happens with files which are removed from class libraries.
You number one way around this is to stop using web site projects. Web Site Projects cause visual studio to automatically add anything it finds in the project path to the project.
Instead, move to Web Application Projects which don't have this behavior problem.
Web Site projects are good for single person developments.
UPDATE:
VB shops from the days gone past had similiar issues in that whatever they had installed affected the build process. You might take a page from their playbook and have a "clean" build machine. Prior to doing a deployment you would delete all of the project folders, then do a get latest. This way you would be sure that the only thing deployed is what you have in source control.
Incidentally, this is also how the TFS Build server works. It deletes the workspace, then creates a new one and downloads the necessary project files.
Further, you might consider using something like Cruise Control to handle builds.
Maybe the dev should take care to only check in or add things that they have been working on. Its kind of sloppy if they are adding things that they were not even using.
Your best solution would be to switch to a better version control system, like SVN.
At my job we recently acquired a project from an outsourcing company who did use VSS as their version control. We were able to import all of the change history into SVN from VSS, and get up and running pretty quickly with SVN at that point.
And with SVN, you can set up ignores for files and folders, so the files in your web projects dont get put into SVN and the ignore attributes are checked out onto each developer's machine
I believe we used VSSMigrate to do the migration to SVN http://www.poweradmin.com/sourcecode/vssmigrate.aspx
VSS is an awful versioning system and you should switch to SVN but that's got nothing to do with the crux of the problem. The project file contains references to what files are actually part of the project. If the visual studio project isn't checked in along with the changes to it, theres no way for any other developer to be fully updated hence queries to delete files when they grab the latest from VSS. From there you've got multiple choices...
Make the vbproj part of the repository. Any project level changes will be part of the commit and other developers can be notified. Problem here is it's also going to be on the dev server. Ideally you could use near the same process to deploy to dev as you would to deploy as release. This leads into the other way...
SVN gives you hooks for almost all major events, where hooks are literally just a properly named batch file / exe. For your purposes, you could use a post-commit hook to push the appropriate files, say via ftp, to the server on every commit. File problems solved, and more importantly closer towards the concept of continuous integration.
Something you may want to consider doing:
Get Latest (Recursive)
Check In ...
Its a manual process, but it may give you the desired result, plus if VS talks about deleted files, you know they should be deleted from the local machine in step 1.

Resources