New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paket should not add <Paket> element in csporj file to cs files that are added via nuggets #1513
Comments
Can't you use the no-content option? |
Then I will need to add this file manually ? |
Ok I don't really understand the problem. What is Orleans expecting? |
It expecting to have this file in the csproject but it do not expect it to have |
It should be just |
Tbh this sounds like a bug in that tool |
I don't sure if it a bug, Paket is not a part of csproj XSD specification so varius tools that do XCD based validation could fail. |
@tsibelman What's the XSD spec say though - I wouldn't have thought that adding an extra element inside the Compile node would have caused an issue? |
It defined inside Microsoft.Build.Commontypes.xsd as you can see Compile has number of possible predefined child elements and Paket is not one of them. <xs:element name="Compile" substitutionGroup="msb:Item">
<xs:annotation>
<xs:documentation><!-- _locID_text="Compile" _locComment="" -->Source files for compiler</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base="msb:SimpleItemType">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:choice>
<xs:element name="SubType"/>
<xs:element name="DependentUpon"/>
<xs:element name="AutoGen">
<xs:annotation>
<xs:documentation><!-- _locID_text="Compile_AutoGen" _locComment="" -->Whether file was generated from another file (boolean)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DesignTime"/>
<xs:element name="Link">
<xs:annotation>
<xs:documentation><!-- _locID_text="Compile_Link" _locComment="" -->Notional path within project to display if the file is physically located outside of the project file's cone (optional)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DesignTimeSharedInput"/>
<xs:element name="Visible">
<xs:annotation>
<xs:documentation><!-- _locID_text="Compile_InProject" _locComment="" -->Display in user interface (optional, boolean)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CopyToOutputDirectory"/>
<xs:element name="VBMyExtensionTemplateID"/>
</xs:choice>
</xs:sequence>
<!-- redefine Include just to give a specific description -->
<xs:attribute name="Include" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation><!-- _locID_text="Compile_Include" _locComment="" -->Semi-colon separated list of source files (wildcards are allowed)</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType> |
Perhaps a |
I think it can work |
Nope. IIRC the attribute failed somewhere in normal csproj process.
|
Can you confirm this - remove the element, replace with attribute, does it work? Not saying that that's the right solution - Orleans is open source, we should find out what it's doing. |
Maybe this info should not be stored in csproj at all ? It already available in nugets. |
@tsibelman it's needed for upgrades between packages I think. |
It's needed for paket to understand where people opt out of default
|
@forki if people choose option content: once it looks logical to not add this element at all, what do you think ? |
Mhm that could make sense. Yes
|
@forki great, this change would definatly help us |
done. please try again |
I tried I see that it still adding it I declared content: once in the start of paket.dependencies and run this command paket convert-from-nuget -f |
yes. try to remove the reference from the csproj to make it believe that it starts from scratch. |
Can it work on conversion from nugget ? |
did not try that |
I wanted it to work during conversion by adding paket.template with content: once, looks like it not working :( |
I made it a bit more agressive. The test shows it's not adding the paket tag any more. In fact it's removing it. |
…ake Orleans tools happy - references #1513
It works perfectly thank you |
Looks like in latest version this behavior not working |
Are you sure? We didn't change that.
|
Let's me double check it |
All good it was my mistake |
Following paket.dependencieswill
Adds empty orleans.codegen.cs file to csproj like this
This unexpected element hides file from Orleans code generator, and no code is created. The failure is detected only during run time, right now we manually remove this property.
The text was updated successfully, but these errors were encountered: