Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is gpstate file in ASP.NET

Tags:

asp.net

In my project I found a .gpState file in the folder, What is the purpose of gpState file?

like image 940
Sauron Avatar asked Jan 18 '10 12:01

Sauron


3 Answers

I have never seen such a file in an ASP.NET app. Are you sure it is from ASP.NET?

Edit: it seems this file comes form the Guidance Automation Toolkit (whatever that is).


Quote from the page linked:

As a developer uses a Guidance Package in their Visual Studio Solution, the Guidance Automation Extensions will store information about how the Guidance Package is used in the solution into a file named <SolutionName>.gpstate in the solution folder. The following information is stored in the .gpstate file:

  • Bound references and their initial state
  • Unbound references and their initial state
  • A list of Guidance Packages that have been enabled on the solution (with version numbers)
  • For each Guidance Package, a flag that says if the binding recipe has been executed for that Guidance Package
  • Version information for the Guidance Package

You should not delete the .gpstate file, because it will cause the solution to lose this information.

By default, the .gpstate file is not added as a solution item in the Visual Studio solution. If a team of developers is working on the same solution and the team wants to share Guidance Package state, the .gpstate file can be added to the solution and checked into source control. If several developers make changes to the Guidance Package state in their solutions at the same time, it will be necessary to merge the changes in the .gpstate file when it is checked in. Another important consideration when using Guidance Packages in a team environment is ensuring that each developer has every Guidance Package required by the solution installed, and that the versions are the same. If there is a mismatch between Guidance Packages or versions installed by different developers, the Guidance Automation Extensions will delete any state that applies to Guidance Packages that are not installed.

like image 143
M4N Avatar answered Nov 05 '22 10:11

M4N


Yes the file comes from GAT

This is what is in it:

`<?xml version="1.0" encoding="utf-8"?>
<GuidancePackagesState xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/pag/gax-gpstate">
  <Packages />
</GuidancePackagesState>`    
like image 27
maqk Avatar answered Nov 05 '22 11:11

maqk


Agree with all other answers. I like better the explanation quoted in this answer from user lgpanaro, straight from patterns & practices forum. Especially the bulleted list, it makes one understand whether you want to check-in those files or not.

And BTW, I think one should.

like image 2
superjos Avatar answered Nov 05 '22 09:11

superjos