Summary of the invention
Fundamental purpose of the present invention is the disposal route and the device that provide a kind of project set, with solve multiple project set quote same project time, the problem of easily makeing mistakes.
To achieve these goals, according to an aspect of the present invention, a kind of disposal route of project set is provided.
Disposal route according to project set of the present invention comprises: obtain the project set in multiple source folder, wherein, and project set REFER object; Project set in multiple source folder is stored to default file folder; According to the refers to of the position adjusted iterm set institute REFER object that the project set in multiple source folder stores in default file folder; Unloading operation is performed to the Component Gallery of the project that project set is quoted; After the Component Gallery of the project quoted project set performs unloading operation, in the default file folder of the project set after storing adjustment, reload the Component Gallery of the project that project set is quoted.
Further, the refers to of adjusted iterm set REFER object comprises: the original path obtaining the refers to of project set REFER object; Deletion action is performed to the original path of the refers to of project set REFER object; After deletion action is performed to the path of the refers to of project set REFER object, redefine the refers to of project set REFER object.
Further, in the project quoted after charging assembly storehouse, the disposal route of project set also comprises: receive and create instruction; New project set is created according to establishment instruction; Under new project set being stored to default file folder.
Further, the project set in multiple source folder is stored to default file folder to comprise: obtain all items set; Shearing manipulation is performed to all items set; Under all items set of shearing being affixed to default file folder.
Further, after the Component Gallery reloading the project that project set is quoted, the disposal route of project set also comprises: obtain the file reloading the Component Gallery of the project that project set is quoted; Determine the position of the default sub-folder under default file folder; The file of the Component Gallery reloading the project that project set is quoted is stored in default sub-folder.
To achieve these goals, according to a further aspect in the invention, a kind for the treatment of apparatus of project set is provided.Treating apparatus according to project set of the present invention comprises: acquiring unit, for obtaining the project set in multiple source folder, wherein, and project set REFER object; Storage unit, for being stored to default file folder by the project set in multiple source folder; Adjustment unit, for the refers to according to the position adjusted iterm set institute REFER object of storage in default file folder of the project set in multiple source folder; Unloading unit, the Component Gallery for the project quoted project set performs unloading operation; And loading unit, after performing unloading operation at the Component Gallery of the project quoted project set, in the default file folder of the project set after storing adjustment, reload the Component Gallery of the project that project set is quoted.
Further, adjustment unit comprises: the first acquisition module, for obtaining the original path of the refers to of project set REFER object; Removing module, the original path for the refers to project set REFER object performs deletion action; And first determination module, after performing deletion action for the path of the refers to project set REFER object, redefine the refers to of project set REFER object.
Further, the process of project set is put and is also comprised: receiver module, for receiving establishment instruction; Creation module, for creating new project set according to establishment instruction; Memory module, under being stored to default file folder by new project set.
Further, storage unit comprises: the second acquisition module, for obtaining all items set; Shear module, for performing shearing manipulation to all items set; Stickup module, under affixing to default file folder by all items set of shearing.
Further, the treating apparatus of project set also comprises: the 3rd acquisition module, for obtaining the file of the Component Gallery reloading the project that project set is quoted; Second determination module, for determining the position of the default sub-folder under default file folder; Load-on module, for being stored to the file of the Component Gallery reloading the project that project set is quoted in default sub-folder.
For the disposal route of above-mentioned project set, due to the project set by obtaining in multiple source folder; Project set in multiple source folder is stored to default file folder; According to the refers to of the position adjusted iterm set institute REFER object that the project set in multiple source folder stores in default file folder; Unloading operation is performed to the Component Gallery of the project that project set is quoted; After the Component Gallery of the project quoted project set performs unloading operation, in the default file folder of the project set after storing adjustment, reload the Component Gallery of the project that project set is quoted.By the present invention, when solving that in prior art, multiple project set quotes same project, the problem of easily makeing mistakes.Thus effectively prevent when multiple project set quotes same project and easily cause code cannot compile the problem passed through.
Embodiment
It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.Below with reference to the accompanying drawings and describe the present invention in detail in conjunction with the embodiments.
The application's scheme is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present application, technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only the embodiment of the application's part, instead of whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making the every other embodiment obtained under creative work prerequisite, all should belong to the scope of the application's protection.
It should be noted that, term " first ", " second " etc. in the instructions of the application and claims and above-mentioned accompanying drawing are for distinguishing similar object, and need not be used for describing specific order or precedence.Should be appreciated that the data used like this can be exchanged, in the appropriate case so that the embodiment of the application described herein.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, such as, contain those steps or unit that the process of series of steps or unit, method, system, product or equipment is not necessarily limited to clearly list, but can comprise clearly do not list or for intrinsic other step of these processes, method, product or equipment or unit.
Fig. 1 is the process flow diagram of the disposal route of project set according to the embodiment of the present invention.As shown in Figure 1, the method comprises following step S101 to step S105:
Step S101, obtains the project set in multiple source folder.
When using SDK (Software Development Kit) to carry out application program, such as, during the application using Visual Studio to develop based on .NETFramework, Visual Studio uses project set and project two-layer configuration to carry out management code, a project set can quote multiple project, and a project can be quoted by multiple solution.Obtain the project set in multiple source folder, this project set is multiple project set.
Step S102, is stored to default file folder by the project set in multiple source folder.
Project set in multiple for the acquisition of above-mentioned acquisition source folder is stored in default file folder.
Particularly, obtain the shearing instruction of outside input, according to this shearing instruction, shearing manipulation is performed to all items set obtained; Obtain the stickup instruction of outside input, according to this stickup instruction, under all items set of shearing being affixed to default file folder.By this step, the project set in multiple source folder is stored to default file folder.
Step S103, according to the refers to of the position adjusted iterm set institute REFER object that the project set in multiple source folder stores in default file folder.
According to the refers to of the position adjusted iterm set institute REFER object that the project set in multiple source folder stores in default file folder.Owing to the project set in multiple source folder to be stored to default file folder, therefore the refers to of project set institute REFER object there occurs change.Therefore, the refers to of adjusted iterm set institute REFER object is needed.
Particularly, the original path of the refers to of project set REFER object is obtained; Deletion action is performed to the original path of the refers to of project set REFER object; After the path of the refers to project set REFER object performs deletion action, redefine the refers to of project set REFER object.
Step S104, performs unloading operation to the Component Gallery of the project that project set is quoted.
Unloading operation is performed to the Component Gallery of the project that project set is quoted.The project that project set is quoted, the Component Gallery that project is quoted, therefore to the project that project set is quoted, the Component Gallery that project is quoted performs unloading operation.Particularly, obtain the unloading command of outside input, according to this unloading command, to the project that project set is quoted, the Component Gallery that project is quoted performs unloading operation.
Step S105, after the Component Gallery of the project quoted project set performs unloading operation, reloads the Component Gallery of the project that project set is quoted in the default file folder of the project set after storing adjustment.
After the Component Gallery of the project quoted project set performs unloading operation, in the default file folder of the project set after storing adjustment, reload the Component Gallery of the project that project set is quoted.Particularly, obtain the file reloading the Component Gallery of the project that project set is quoted, determine the position of the default sub-folder under default file folder; The file of the Component Gallery reloading the project that project set is quoted is stored in default sub-folder.
When loading the Component Gallery of the project that project set is quoted, the dll file of the Component Gallery generated all can be stored in the default sub-folder in default file folder, such as, default sub-folder is packages, under the catalogue packages that the dll file being about to the Component Gallery generated all can be stored in default file folder.
Preferably, under being also stored in default file folder to make the new project set created, in the disposal route of the project set provided in the embodiment of the present invention, the process of project set also comprises: receive and create instruction; New project set is created according to establishment instruction; Under new project set being stored to default file folder.
Pass through the method, ensure that when when a newly-built project set, under new project set file being also placed into default file folder, this stylish project set is quoted existing project and would not be made mistakes, and newly-built project also normally can be quoted by other project set.
Below the whole flowchart process of the method is illustrated:
A newly-built file, called after _ Solutions, this file is for storing all project set files.And all Component Gallery files are stored in the packages file under this catalogue.By in all project set paper cuts to _ Solutions file, open respectively these move position after project set file, adjusted iterm is set a file the correct refers to of middle REFER object.The Component Gallery of project in the set of unloading all items, reload the Component Gallery of project in all items set, because all project set files are all in _ Solutions file, therefore after reinstalling Component Gallery, all Component Gallery files all can be downloaded to _ Solutions file under sub-folder packages in, therefore no matter open which project set, correct Component Gallery file can be referred to.If Component Gallery file is cleaned, so any one project set also can by these Component Gallery file download under the file preset.
Any newly-built project set is also placed into _ Solutions file in, no matter be newly-built project or quote original project, due to all Component Galleries be stored in _ Solutions file in, therefore new project set can not cause compiling to pass through because REFER object is made mistakes.
Below the whole detailed process of the disposal route of project set of the present invention is illustrated:
Suppose the Component Gallery (or title Nuget wraps, and is described with Nuget bag) having following project set, project and project to quote below.
State before process: project set SolutionA.sln refer to project Project1.csproj, Project2.csproj; Project set SolutionB.sln refer to project Project2.csproj, Project3.csproj.
Project Project1.csproj refer to Nuget bag: NA; Project Project2.csproj refer to Nuget bag: NB; Project Project3.csproj refer to Nuget bag: NC;
It should be noted that, project set is not limited to .sln file; Project is not limited to .csproj file
Suppose that each file above-mentioned is stored in source document folder, as shown in table 1:
Table 1
Project set REFER object, project quotes Nuget bag, and the path of foregoing description is all relative path.Particularly, SolutionA.sln refer to project Project1.csproj, Project2.csproj; SolutionB.sln refer to project Project2.csproj, Project3.csproj; Project1.csproj refer to Nuget bag: NA; Project2.csproj refer to Nuget bag: NB.The concrete content stored hereof, as shown in table 2, table 3 and table 4:
Table 2
Table 3
Table 4
According to the present invention program, the state after carrying out processing and processing is as follows.
The first step, new folder _ Solutions, to suppose _ store path of Solutions is: D: _ Solutions.
Second step, transfers to above-mentioned file by project set, the state after mobile, as shown in table 5.
Table 5
Filename |
Path |
SolutionA.sln |
D:\_Solutions\SolutionA.sln |
SolutionB.sln |
D:\_Solutions\SolutionB.sln |
Although move project set file, project set file content does not change, and such as, at this moment the document location state of project set does not change, as shown in table 6.
Table 6
At this moment relative to the position that present SolutionA.sln stores, .. .. Projects Project1.csproj, .. .. Projects Project2.csproj, there are not this two files in these two positions, project is also in original memory location, therefore need the refers to adjusting SolutionA.sln file REFER object, after adjustment, item location is as shown in table 7.
Table 7
Similar, the refers to of project set SolutionB.sln REFER object also needs adjustment, and after adjustment, item location is as shown in table 8:
Table 8
After have adjusted the refers to of project set REFER object, unloading Nuget bag, then reinstall Nuget bag, certainly, Nuget wraps the position downloaded to also can be changed, as shown in table 9:
Table 9
In whole process, the position that project stores can not change, and project set and Nuget package location can change.By this step, edit any project set, correct Nuget APMB package can be referred to.If Nuget APMB package is cleaned, so any one project set file download that also these Nuget can be wrapped is under the file preset.Follow-up any newly-built project set is also placed into _ Solutions file in, no matter be newly-built project or quote original project, due to all Nuget bag be stored in _ Solutions file in, therefore new project set can not cause compiling to pass through because REFER object is made mistakes.
The disposal route of the project set that the embodiment of the present invention provides, by obtaining the project set in multiple source folder; Project set in multiple source folder is stored to default file folder; According to the refers to of the position adjusted iterm set institute REFER object that the project set in multiple source folder stores in default file folder; Unloading operation is performed to the Component Gallery of the project that project set is quoted; After the Component Gallery of the project quoted project set performs unloading operation, in the default file folder of the project set after storing adjustment, reload the Component Gallery of the project that project set is quoted.By the present invention, when solving that in prior art, multiple project set quotes same project, the problem of easily makeing mistakes.Thus effectively prevent when multiple project set quotes same project and easily cause code cannot compile the problem passed through.
It should be noted that, can perform in the computer system of such as one group of computer executable instructions in the step shown in the process flow diagram of accompanying drawing, and, although show logical order in flow charts, but in some cases, can be different from the step shown or described by order execution herein.
The embodiment of the present invention additionally provides a kind for the treatment of apparatus of project set, it should be noted that, the treating apparatus of the project set of the embodiment of the present invention may be used for performing the disposal route for project set that the embodiment of the present invention provides.Below the treating apparatus of the project set that the embodiment of the present invention provides is introduced.
Fig. 2 is the schematic diagram of the treating apparatus of project set according to the embodiment of the present invention.As shown in Figure 2, this device comprises: acquiring unit 10, storage unit 20, adjustment unit 30, unloading unit 40 and loading unit 50.
Acquiring unit 10, for obtaining the project set in multiple source folder, wherein, project set REFER object.
Storage unit 20, for being stored to default file folder by the project set in multiple source folder.
Particularly, this storage unit 20 comprises: the second acquisition module, for obtaining all items set; Shear module, for performing shearing manipulation to all items set; Stickup module, under affixing to default file folder by all items set of shearing.
Adjustment unit 30, for the refers to according to the position adjusted iterm set institute REFER object of storage in default file folder of the project set in multiple source folder.
According to the refers to of the position adjusted iterm set institute REFER object that the project set in multiple source folder stores in default file folder.Owing to the project set in multiple source folder to be stored to default file folder, therefore the refers to of project set institute REFER object there occurs change.Therefore, the refers to of adjusted iterm set institute REFER object is needed.
Particularly, this adjustment unit 30 comprises: the first acquisition module, for obtaining the original path of the refers to of project set REFER object; Removing module, the original path for the refers to project set REFER object performs deletion action; First determination module, after the path execution deletion action for the refers to project set REFER object, redefines the refers to of project set REFER object.
Unloading unit 40, the Component Gallery for the project quoted project set performs unloading operation.
Loading unit 50, after performing unloading operation at the Component Gallery of the project quoted project set, reloads the Component Gallery of the project that project set is quoted in the default file folder of the project set after storing adjustment.
Preferably, in the treating apparatus of the project set provided in the embodiment of the present invention, this device also comprises: receiver module, for receiving establishment instruction; Creation module, for creating new project set according to establishment instruction; Memory module, under being stored to default file folder by new project set.
Preferably, in the treating apparatus of the project set provided in the embodiment of the present invention, this device also comprises: the 3rd acquisition module, for obtaining the file of the Component Gallery reloading the project that project set is quoted; Second determination module, for determining the position of the default sub-folder under default file folder; Load-on module, for being stored to the file of the Component Gallery reloading the project that project set is quoted in default sub-folder.
The treating apparatus of the project set that the embodiment of the present invention provides, obtains the project set in multiple source folder by acquiring unit 10, wherein, and project set REFER object; Project set in multiple source folder is stored to default file folder by storage unit 20; The refers to of the position adjusted iterm set institute REFER object that adjustment unit 30 stores in default file folder according to the project set in multiple source folder; The Component Gallery of the project that unloading unit 40 pairs of project sets are quoted performs unloading operation; Loading unit 50, after the Component Gallery of the project quoted project set performs unloading operation, reloads the Component Gallery of the project that project set is quoted in the default file folder of the project set after storing adjustment.By the present invention, when solving that in prior art, multiple project set quotes same project, the problem of easily makeing mistakes.Thus effectively prevent when multiple project set quotes same project and easily cause code cannot compile the problem passed through.
Obviously, those skilled in the art should be understood that, above-mentioned of the present invention each module or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on network that multiple calculation element forms, alternatively, they can realize with the executable program code of calculation element, thus, they can be stored and be performed by calculation element in the storage device, or they are made into each integrated circuit modules respectively, or the multiple module in them or step are made into single integrated circuit module to realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.