我正在从net下载的visual studio中运行一个示例项目。当我在视觉学习2015中打开项目并构建解决方案时,我得到以下错误,我不知道我在这里缺少什么,因为它已经完成样本并在网上上传
1>------ Rebuild All started: Project: QvEventLogConnectorElaborate, Configuration: Release x86 ------
1>C:\Users\star\Downloads\QvxSDK_2.1_x64\Examples\EventLogElaborate\QvEventLogConnectorElaborate\Standalone.Designer.cs(15,10,15,11): error CS1525: Invalid expression term '<'
1>C:\Users\star\Downloads\QvxSDK_2.1_x64\Examples\EventLogElaborate\QvEventLogConnectorElaborate\Standalone.Designer.cs(15,26,15,31): error CS1002: ; expected
1>C:\Users\star\Downloads\QvxSDK_2.1_x64\Examples\EventLogElaborate\QvEventLogConnectorElaborate\Standalone.Designer.cs(15,79,15,79): error CS1525: Invalid expression term '<'
1>C:\Users\star\Downloads\QvxSDK_2.1_x64\Examples\EventLogElaborate\QvEventLogConnectorElaborate\Standalone.Designer.cs(16,10,16,10): error CS1525: Invalid expression term '<'
1>C:\Users\star\Downloads\QvxSDK_2.1_x64\Examples\EventLogElaborate\QvEventLogConnectorElaborate\Standalone.Designer.cs(17,11,17,13): error CS1002: ; expected
1>C:\Users\star\Downloads\QvxSDK_2.1_x64\Examples\EventLogElaborate\QvEventLogConnectorElaborate\Standalone.Designer.cs(17,24,17,34): error CS1002: ; expected
1>C:\Users\star\Downloads\QvxSDK_2.1_x64\Examples\EventLogElaborate\QvEventLogConnectorElaborate\Standalone.Designer.cs(17,45,17,46): error CS1525: Invalid expression term '>'
1>C:\Users\star\Downloads\QvxSDK_2.1_x64\Examples\EventLogElaborate\QvEventLogConnectorElaborate\Standalone.Designer.cs(17,46,17,46): error CS1525: Invalid expression term '<'
1>C:\Users\star\Downloads\QvxSDK_2.1_x64\Examples\EventLogElaborate\QvEventLogConnectorElaborate\Standalone.Designer.cs(18,11,18,13): error CS1002: ; expected
1>C:\Users\star\Downloads\QvxSDK_2.1_x64\Examples\EventLogElaborate\QvEventLogConnectorElaborate\Standalone.Designer.cs(18,76,18,84): error CS1002: ; expected
1>C:\Users\star\Downloads\QvxSDK_2.1_x64\Examples\EventLogElaborate\QvEventLogConnectorElaborate\Standalone.Designer.cs(18,104,18,131): error CS1002: ; expected
1>C:\Users\star\Downloads\QvxSDK_2.1_x64\Examples\EventLogElaborate\QvEventLogConnectorElaborate\Standalone.Designer.cs(18,139,18,150): error CS1002: ; expected
1>C:\Users\star\Downloads\QvxSDK_2.1_x64\Examples\EventLogElaborate\QvEventLogConnectorElaborate\Standalone.Designer.cs(18,164,18,168): error CS1002: ; expected
1>C:\Users\star\Downloads\QvxSDK_2.1_x64\Examples\EventLogElaborate\QvEventLogConnectorElaborate\Standalone.Designer.cs(18,207,18,219): error CS1002: ; expected
代码是
namespace QvEventLogConnectorElaborate
{
partial class Standalone
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{< DirectedGraph xmlns = "http://schemas.microsoft.com/vs/2009/dgml" >
<Nodes>
<Node Id="(@1 @2)" Visibility="Hidden" />
<Node Id="(@3 Namespace=QvEventLogConnectorElaborate Type=Standalone)" Category="CodeSchema_Class" CodeSchemaProperty_IsPublic="True" CommonLabel="Standalone" Icon="Microsoft.VisualStudio.Class.Public" IsDragSource="True" Label="Standalone" SourceLocation="(Assembly=file:///C:/Users/star/Downloads/QvxSDK_2.1_x64/Examples/EventLogElaborate/QvEventLogConnectorElaborate/Standalone.Designer.cs StartLineNumber=2 StartCharacterOffset=18 EndLineNumber=2 EndCharacterOffset=28)" />
</Nodes>
<Links>
<Link Source="(@1 @2)" Target="(@3 Namespace=QvEventLogConnectorElaborate Type=Standalone)" Category="Contains" />
</Links>
<Categories>
<Category Id="CodeSchema_Class" Label="Class" BasedOn="CodeSchema_Type" Icon="CodeSchema_Class" />
<Category Id="CodeSchema_Type" Label="Type" Icon="CodeSchema_Class" />
<Category Id="Contains" Label="Contains" Description="Whether the source of the link contains the target object" IsContainment="True" />
</Categories>
<Properties>
<Property Id="CodeSchemaProperty_IsPublic" Label="Is Public" Description="Flag to indicate the scope is Public" DataType="System.Boolean" />
<Property Id="CommonLabel" DataType="System.String" />
<Property Id="Icon" Label="Icon" DataType="System.String" />
<Property Id="IsContainment" DataType="System.Boolean" />
<Property Id="IsDragSource" Label="IsDragSource" Description="IsDragSource" DataType="System.Boolean" />
<Property Id="Label" Label="Label" Description="Displayable label of an Annotatable object" DataType="System.String" />
<Property Id="SourceLocation" Label="Start Line Number" DataType="Microsoft.VisualStudio.GraphModel.CodeSchema.SourceLocation" />
<Property Id="Visibility" Label="Visibility" Description="Defines whether a node in the graph is visible or not" DataType="System.Windows.Visibility" />
</Properties>
<QualifiedNames>
<Name Id="Assembly" Label="Assembly" ValueType="Uri" />
<Name Id="File" Label="File" ValueType="Uri" />
<Name Id="Namespace" Label="Namespace" ValueType="System.String" />
<Name Id="Type" Label="Type" ValueType="System.Object" />
</QualifiedNames>
<IdentifierAliases>
<Alias n="1" Uri="Assembly=$(VsSolutionUri)/QvEventLogConnectorElaborate/QvEventLogConnectorElaborate.csproj" />
<Alias n="2" Uri="File=$(VsSolutionUri)/QvEventLogConnectorElaborate/Standalone.Designer.cs" />
<Alias n="3" Uri="Assembly=$(b696d163-8da0-45ae-a3db-010975425ad0.OutputPathUri)" />
</IdentifierAliases>
<Paths>
<Path Id="b696d163-8da0-45ae-a3db-010975425ad0.OutputPathUri" Value="file:///C:/Users/star/Downloads/QvxSDK_2.1_x64/Examples/EventLogElaborate/QvEventLogConnectorElaborate/bin/Release/QvEventLogConnectorElaborate.exe" />
<Path Id="VsSolutionUri" Value="file:///C:/Users/star/Downloads/QvxSDK_2.1_x64/Examples/EventLogElaborate" />
</Paths>
</DirectedGraph>
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
删除.cs文件中的xml代码并重建它后,我得到以下错误
1>------ Build started: Project: QvEventLogConnectorElaborate, Configuration: Release x86 ------
1> QvEventLogConnectorElaborate -> C:\Users\star\Downloads\QvxSDK_2.1_x64\Examples\EventLogElaborate\QvEventLogConnectorElaborate\bin\Release\QvEventLogConnectorElaborate.exe
1> relstamp file=[C:\Users\star\Downloads\QvxSDK_2.1_x64\Examples\EventLogElaborate\QvEventLogConnectorElaborate\bin\Release\QvEventLogConnectorElaborate.exe]
1> Exception in ParseBinaryVersionResource
1> Error in ParseBinaryVersionResource
1> error parsing version info from the file
1> Some of actions failed, exiting
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4713,5): error MSB3073: The command ""C:\Users\star\Downloads\QvxSDK_2.1_x64\Examples\EventLogElaborate\QvEventLogConnectorElaborate\verpatch.exe" "C:\Users\star\Downloads\QvxSDK_2.1_x64\Examples\EventLogElaborate\QvEventLogConnectorElaborate\bin\Release\QvEventLogConnectorElaborate.exe" /s "QlikView Connector" "Qv Event Log Connector Elaborate"
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4713,5): error MSB3073: " exited with code 1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
感谢任何帮助。
答案 0 :(得分:0)
这不是有效的c#,里面有XML。编译器在遇到的第一个<
失败。删除整个XML片段:
namespace QvEventLogConnectorElaborate
{
partial class Standalone
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
}
}