From within Visual Studio I try to commit to a tfs repository. I can use the Server Browser and update my sources. But when I click onto "pending changes" I receive the following error:
System.ComponentModel.Composition.CompositionException: The
composition produced a single composition error. The root cause is
provided below. Review the CompositionException.Errors property for
more detailed information.
1) Cannot create an instance of type
'Microsoft.TeamFoundation.VersionControl.Controls.LabelSaveException'
because a constructor could not be selected for construction. Ensure
that the type either has a default constructor, or a single
constructor marked with the
'System.ComponentModel.Composition.ImportingConstructorAttribute'.
Resulting in: Cannot activate part
'Microsoft.TeamFoundation.VersionControl.Controls.LabelSaveException'.
Element:
Microsoft.TeamFoundation.VersionControl.Controls.LabelSaveException
--> Microsoft.TeamFoundation.VersionControl.Controls.LabelSaveException
Resulting in: Cannot get export
'Microsoft.TeamFoundation.VersionControl.Controls.LabelSaveException
(ContractName="Microsoft.TeamFoundation.Controls.ITeamExplorerSection")'
from part
'Microsoft.TeamFoundation.VersionControl.Controls.LabelSaveException'.
Element:
Microsoft.TeamFoundation.VersionControl.Controls.LabelSaveException
(ContractName="Microsoft.TeamFoundation.Controls.ITeamExplorerSection")
--> Microsoft.TeamFoundation.VersionControl.Controls.LabelSaveException
at
System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine
engine, ComposablePart part, ExportDefinition definition) at
System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(CatalogPart
part, ExportDefinition export, Boolean isSharedPart) at
System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()
at System.ComponentModel.Composition.Primitives.Export.get_Value()
at
System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export
export) at
System.ComponentModel.Composition.ReflectionModel.ExportFactoryCreator.LifetimeContext.GetExportLifetimeContextFromExport[T](Export
export) at
System.ComponentModel.Composition.ReflectionModel.ExportFactoryCreator.<>c__DisplayClass72.<CreateStronglyTypedExportFactoryOfTM>b__6()
at System.ComponentModel.Composition.ExportFactory1.CreateExport()
at
Microsoft.TeamFoundation.Controls.WPF.TeamExplorer.Framework.TeamExplorerSectionHost.Create()
I CAN still check in my changes, but the "comment" area is missing. How to solve this?
(UPDATE): I receive the same error when I try to display the "Changeset Details"
But no Error when displaying the History
Related
My customer set up a new S/4HANA system and installed some Fiori apps. When I go into my user settings in the Fiori LaunchPad and navigate into the Default Values tab, I:
don't get a value help,
entered values, e.g. Controlling Area, are not propagated into the backend's user parameter's (SU01).
Per Chrome Developer Tools I get the following error messages. I suspect that something is misconfigured causing the above 2 observations?
The following parameter names have no editor metadata and thus likely no configured plugin:
"AssetDepreciationArea",
"CompanyCode",
"ControllingArea",
"CostCenter",
"ExchangeRateType",
"FinancialStatementVariant",
"FiscalYear",
"FunctionalArea",
"GLAccount",
"GLAccountHierarchy",
"InternalOrder",
"Ledger",
"LedgerFiscalYear",
"Material",
"MaterialGroup",
"MaterialType",
"Plant",
"ProfitCenter",
"Segment",
"StatisticalKeyFigure",
"StorageLocation".
This has been resolved. The issue was a misconfiguration. The customer has added the correct navigation targets in the respective catalogues. This solves problems (1) and (2).
In the related TfvcTemplate.12.xaml the solution is to add the build number like so:
<mtbwa:MSBuild CommandLineArguments="[String.Format("/p:SkipInvalidConfigurations=true
/p:BuildNumber={1} {0}", MSBuildArguments, BuildDetail.BuildNumber)]"
In the Git template the arguments have slightly changed, but doing the same results in the following error
Compiler error(s) encountered processing expression
"String.Format("/p:SkipInvalidConfigurations=true /p:BuildNumber={1} {0}",
AdvancedBuildSettings.GetValue(Of String)("MSBuildArguments", String.Empty),
BuildDetail.BuildNumber)".
'Microsoft.TeamFoundation.Build.Client.BuildDetail' is not accessible in
this context because it is 'Friend'.
What is the correct way to expose the BuildNumber in this template?
There's two steps I had to go through to make this work.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/49f11ed9-9fa8-4c20-952a-d39ee7e71051/can-no-longer-user-builddetaildroplocation-for-copydirectory-with-tfs-2013-using-build-process?forum=tfsbuild
Within the same template you modified in step 1 click on the "Run MSBuild" activity, view properties and open "CommandLineArguments". I'm using OctoPack for Octopus Deploy so here's what my arguments look like:
String.Format("/p:SkipInvalidConfigurations=true /p:BuildNumber={1} {0}
/p:OctoPackPackageVersion={1}", AdvancedBuildSettings.GetValue(Of
String)("MSBuildArguments", String.Empty), BuildDetail.BuildNumber)
As you can see, BuildNumber is specified there so you can just remove the Octopus property I added. Finally within your msbuild file (.csproj for example) you'd use build number like so $(BuildNumber)
I'm specifying a label in the "Get Version" property of a TFS 2012 build definition:
Get Version: LMyLabel
However, if MyLabel doesn't exist, the build fails with this error message:
Exception Message: TF14064: Could not find label MyLabel#*. (type LabelNotFoundException)
How can I configure the build to default to the latest code if MyLabel doesn't exist?
You would have to customise the template.
Locate the Get Workspace Activity
Note that it's properties has the GetVersion Argument
Now add a Try Catch Activity, where the current Get Workspace Activity resides
Copy the original Get Workspace Activity to the Try.
Copy the Get Workspace Activity and place it in the catch, Set the catch to Exception
In the Properties of you Get Workspace Activity set the VersionOverride value to be blank.
This should now try and Donwload the source for a label you supply, if that label is not present then the catch should be hit and you should then download the latest code.
This was done on the fly and may need some minor tweeking!
I'm wondering if someone has an example on how can be used the TJvProgramVersionCheck component performing the check via HTTP.
The example in the JVCL examples dir doesn't show how to use HTTP
thank you
The demo included in your $(JVCL)\Examples\JvProgramVersionCheck folder seems to be able to do so. Edit the properties of the JVProgramVersionHTTPLocation, and add the URL to it's VersionInfoLocation list (a TStrings). You can also set up any username, password, proxy, and port settings if needed.
You also need to add an OnLoadFileFromRemote event handler. I don't see anything in the demo that addresses that requirement, but the source code says:
{ Simple HTTP location class with no http logic.
The logic must be implemented manually in the OnLoadFileFromRemote event }
It appears from the parameters that event receives that you do your checking there:
function TJvProgramVersionFTPLocation.LoadFileFromRemoteInt(
const ARemotePath, ARemoteFileName, ALocalPath, ALocalFileName: string;
ABaseThread: TJvBaseThread): string;
So you'll need to add an event handler for this event, and then change the TJVProgramVersionCheck.LocationType property to pvltHTTP and run the demo. After testing, it seems you're provided the server and filename for the remote version, and a local path and temp filename for the file you download. The event handler's Result should be the full path and filename of the newly downloaded file. Your event handler should take care of the actual retrieval of the file.
There are a couple of additional types defined in JvProgramVersionCheck.pas, (TJvProgramVersionHTTPLocationICS and TJvProgramVersionHTTPLocationIndy, both protected by compiler defines so they don't exist in the default compilation. However, setting the ICS related define resulted in lots of compilation errors (it apparently was written against an old version of ICS), and setting the Indy define (and then setting it again to use Indy10 instead) allowed it to compile but didn't change any of the behavior. I'm going to look more into this later today.
Also, make sure that the VersionInfoLocation entry is only the URL (without the filename); the filename itself goes in the VersionInfoFileName property. If you put it in the URL, it gets repeated (as in http://localhost/Remote/ProjectVersions_http.iniProjectVersions_http.ini, and will fail anyway. (I found this while tracing through the debugger trying to solve the issue.)
Finally...
The solution is slightly (but not drastically) complicated. Here's what I did:
Copy JvProgramVersionCheck.pas to the demo folder. (It needs to be recompiled because of the next step.)
Go to Project->Options->Directories and Conditionals, and add the following line to the DEFINES entry:
USE_3RDPARTY_INDY10;USE_THIRDPARTY_INDY;
Delete the JvProgramVersionHTTPLocation component from the demo form.
Add a new private section to the form declaration:
private
HTTPLocation: TJvProgramVersionHTTPLocationIndy;
In the FormCreate event, add the following code:
procedure TForm1.FormCreate(Sender: TObject);
const
RemoteFileURL = 'http://localhost/';
RemoteFileName = 'ProjectVersions_http.ini';
begin
HTTPLocation := TJvProgramVersionHTTPLocationIndy.Create(Self); // Self means we don't free
HTTPLocation.VersionInfoLocationPathList.Add(RemoteFileURL);
HTTPLocation.VersionInfoFileName := RemoteFileName;
ProgramVersionCheck.LocationHTTP := HTTPLocation;
ProgramVersionCheck.LocationType := pvltHTTP;
VersionCheck; // This line is already there
end;
In the ProgramVersionCheck component properties, expand the VersionInfoFileOptions property, and change the FileFormat from hffXML to hffIni.
Delete or rename the versioninfolocal.ini from the demo's folder. (If you've run the app once, it stores the http location info, and the changes above are overwritten. This took a while to track down.)
Make sure your local http server is running, and the ProjectVersions_http.ini file is in the web root folder. You should then be able to run the demo. Once the form appears, click on the Edit History button to see the information retrieved from the remote version info file. You'll also have a new copy of the versioninfolocal.ini that has the saved configuration info you entered above.
Hii ppl I am trying to pass parameter thro msiexec in command prompt . The problem is eventhough the parameter is passed properly the value doesnt get reflected in the OnBeforeInstallEvent. Therefore the msi doesnt get installed.
The OnBeforeInstall is written C#.net framework 2.09 (VS 2005) and the event call is given below,
string serverName=Context.Parameters["SERVERNAME"].
For example, In the custom action the parameter is properly declared as /SERVERNAME=[SERVERNAME] so as to access the server name.
There is no problem when I install thro normal UI mode when I pass the parameter thro Msiexec the value doesnt get reflected at the OnBeforeInstall event. I even tried logging the flow of installation thro MSIEXEC /Log , the value gets changed in log ( shown below)
PROPERTY CHANGE: Adding SERVERNAME property. Its value is 'machine1'.
I have given below the msiexec command which I use to pass values,
msiexec.exe /i "C:\Server.msi" /l*v "C:\Server.txt" ALLUSERS=1 REBOOT=ReallySupress TARGETDIR="C:\Program Files\Server" SERVERNAME="machine1" PORT="9090"
but on reaching ONBeforeInstall the value is empty (show below).
Error 1001. An exception occurred in the OnBeforeInstall event handler of Server.ServicesInstaller. --> Installation cannot be continued as some of the installation parameters are not given.
More Info -Server Name cannot be empty.
DEBUG: Error 2769: Custom Action _542E7AC5_7403_434A_874B_DE2872A4848D.install did not close 1 MSIHANDLEs.
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2769.
Moreover, the Operating system is Win 2003 . I even tried the Msiexec in Win XP too Still no go. The SERVERNAME is the property name of one of the textboxes in the TextBox2 Dialog box of setup kit. While observing the installation log , the property change event is recognizing the value change for SERVERNAME but It becomes null while reaching the OnBeforeInstall event don kno wy.
As said earlier it works perfectly in normal UI mode. I even tried modifying the property table of Server.msi thro ORCA(as given below).
Table :Property
Row :SecureCustomProperties Property -> SecureCustomProperties Changed value from NEWERPRODUCTFOUND to NEWERPRODUCTFOUND;SERVERNAME
Still no go
Please Help.
Many thanks,
byfour
Hii PPl,
I fixed it myself I jus removed the rows like CustomTextA_SetProperty_EDIT1 from customaction table and their refferences in other tables using ORCA and it solved the issue.
Many thanks,
byfour