简体   繁体   English

用于C#应用程序的Retromigration 4.5至3.5 .net框架

[英]Retromigration 4.5 to 3.5 .net framework for c# application

I have created an application with Visual Studio 2013 on my own PC with my own Visual Studio. 我已经使用自己的Visual Studio在自己的PC上使用Visual Studio 2013创建了一个应用程序。 The application is on test phase and I have to send it to my job's one. 该应用程序处于测试阶段,我必须将其发送到我的工作。 Problem, why I start the .exe, I have the error 问题,为什么我启动.exe,出现错误

To run this application, you first must install one of the following versions of the .NET Framework: .NETFramework,Version=v4.5 若要运行此应用程序,您首先必须安装以下版本的.NET Framework:.NETFramework,Version = v4.5

If I could install the framework, it won't a problem, but the enterprise where I work won't update it. 如果我可以安装该框架,则不会有问题,但是我工作的企业不会对其进行更新。 Thay stand in 3.5 SP1. Thay站在3.5 SP1中。

The main problem concern the DataGridColumnHeader , DataGridTextColumn and all their dependencies like this: 主要问题涉及DataGridColumnHeaderDataGridTextColumn及其所有依赖项,如下所示:

<DataGrid x:Name="DonneesBrutes" IsReadOnly="True" ItemsSource="{Binding Path=ResultatCollectionGrande}" Margin="10,60,0,5" AutoGenerateColumns="False" EnableRowVirtualization="True" RowDetailsVisibilityMode="VisibleWhenSelected" MouseDown="Impacts">

    <DataGrid.Columns>
        <DataGridTemplateColumn x:Name="PrisEnCompte" Width="50" Header="PEC">
            <DataGridTemplateColumn.CellTemplate>
                <DataTemplate>
                    <Image Height="20" Width="20" Source="{Binding Path=Flag, Converter={StaticResource BooleanConverter}}"/>
                </DataTemplate>
            </DataGridTemplateColumn.CellTemplate>
        </DataGridTemplateColumn>
        <DataGridTextColumn x:Name="PMRQ" Width="80" Binding="{Binding Path=Pmid}" Header="PMID"></DataGridTextColumn>
        <DataGridTextColumn x:Name="Ligne" Width="40" Binding="{Binding Path=Ligne}" Header="Ligne" IsReadOnly="True"></DataGridTextColumn>
        <DataGridTextColumn x:Name="LibellePMRQ" Width="*" Binding="{Binding Path=LibellePmrq}" Header="Libellé PMRQ">
            <DataGridTextColumn.CellStyle>
                <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
                    <Setter Property="ToolTip"
        Value="{Binding LibellePmrq}"/>
                </Style>
            </DataGridTextColumn.CellStyle>
        </DataGridTextColumn>
        <DataGridTextColumn x:Name="OTM" Width="80" Binding="{Binding Path=Otm}" Header="OTM"></DataGridTextColumn>
        <DataGridTextColumn x:Name="TOTM" Width="45" Binding="{Binding Path=Totm}" Header="TOTM"></DataGridTextColumn>
        <DataGridTextColumn x:Name="LibelleTOTM" Width="*" Binding="{Binding Path=LibelleTotm}" Header="Libellé TOTM">
            <DataGridTextColumn.CellStyle>
                <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
                    <Setter Property="ToolTip"
        Value="{Binding LibelleTotm}"/>
                </Style>
            </DataGridTextColumn.CellStyle>
        </DataGridTextColumn>
        <DataGridTextColumn x:Name="GA" Width="65" Binding="{Binding Path=GroupeAlerte}" Header="GA"></DataGridTextColumn>
        <DataGridTextColumn x:Name="Discipline" Width="65" Binding="{Binding Path=Discipline}" Header="Discipline"></DataGridTextColumn>
        <DataGridTextColumn x:Name="DisciplineSubstituee" Width="120" Binding="{Binding Path=DisciplineSubstituee}" Header="Discipline Substituée">
        </DataGridTextColumn>
        <DataGridTextColumn x:Name="Remarque" Width="70" Binding="{Binding Path=.Remarque}" Header="Remarque"></DataGridTextColumn>

    </DataGrid.Columns>
</DataGrid>

I have seen it's because DataGrid did not exist on 3.5 SP1 我已经看到这是因为DataGrid在3.5 SP1上不存在

What can I do to continue getting a similar result than before? 我怎样做才能继续获得与以前相似的结果?

Thanks in advance for your help, now that I'm not that used to code on c#, If I have some framework compatibility problems, I'm quite lost... 在此先感谢您的帮助,因为我现在不习惯在C#上进行编码,如果遇到一些框架兼容性问题,我会迷路的...

Finally I have built something like this: 最后,我建立了这样的东西:

            <ListView.View>
                <GridView x:Name="gridView">
                    <GridViewColumn Width="50" Header="PEC" x:Name="PrisEnCompte" DisplayMemberBinding="{Binding Path=Flag, Converter={StaticResource BooleanConverter}}" />
                    <GridViewColumn Width="80" Header="PMID" x:Name="PMRQ" DisplayMemberBinding="{Binding Path=Pmid}"/>
                    <GridViewColumn Width="40" Header="Ligne" x:Name="Ligne" DisplayMemberBinding="{Binding Path=Ligne}"/>
                    <GridViewColumn Width="250" Header="Libellé PMRQ" x:Name="LibellePMRQ" DisplayMemberBinding="{Binding Path=LibellePmrq}">
                        <GridViewColumn.HeaderContainerStyle>
                            <Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource {x:Type GridViewColumnHeader}}">
                                <Setter Property="ToolTip" Value="{Binding LibellePmrq}"></Setter>
                            </Style>
                        </GridViewColumn.HeaderContainerStyle>
                    </GridViewColumn>
                    <GridViewColumn Width="80" Header="OTM" x:Name="OTM" DisplayMemberBinding="{Binding Path=Otm}"/>
                    <GridViewColumn Width="45" Header="TOTM" x:Name="TOTM" DisplayMemberBinding="{Binding Path=Totm}"/>
                    <GridViewColumn Width="250" Header="Libellé TOTM" x:Name="LibelleTOTM" DisplayMemberBinding="{Binding Path=LibelleTotm}">
                        <GridViewColumn.HeaderContainerStyle>
                            <Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource {x:Type GridViewColumnHeader}}">
                                <Setter Property="ToolTip" Value="{Binding LibelleTotm}"></Setter>
                            </Style>
                        </GridViewColumn.HeaderContainerStyle>
                    </GridViewColumn>
                    <GridViewColumn Width="65" Header="GA" x:Name="GA" DisplayMemberBinding="{Binding Path=GroupeAlerte}"/>
                    <GridViewColumn Width="65" Header="Discipline" x:Name="Discipline" DisplayMemberBinding="{Binding Path=Discipline}"/>
                    <GridViewColumn Width="120" Header="Discipline Substituée" x:Name="DisciplineSubstituee" DisplayMemberBinding="{Binding Path=DisciplineSubstituee}"/>
                    <GridViewColumn Width="70" Header="Remarque" x:Name="Remarque" DisplayMemberBinding="{Binding Path=Remarque}"/>

                </GridView>
            </ListView.View>
        </ListView>

I cannot test if it works because I have more or less 30 others errors and 40 Warnings. 我无法测试它是否有效,因为我或多或少有30个其他错误和40个警告。 Mainly about Entity Framework for the warnings and missing assemblies/references for the errors... But I think it should work like this. 主要是关于警告的Entity Framework和缺少错误的程序集/引用...但是我认为它应该像这样工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将项目.net目标框架从3.5升级到4.5后,日历中的C#错误 - C# Error in calendar after upgrading project .net target framework from 3.5 to 4.5 OpenSSL 相当于 C#,.Net Framework 4.5 - OpenSSL equivalent in C#, .Net Framework 4.5 C#和.NET Framework 3.5中的后期绑定 - Late binding in C# and .NET Framework 3.5 使用C#的.NET Framework 3.5中的并行编程 - Parallel programming in .NET Framework 3.5 with c# 在C#.Net Framework 4.5中定义Excel应用程序后弹出MessageBox&#39;无法加载TalkAPI库&#39; - MessageBox 'Could not load TalkAPI library' pops up after defining an Excel Application in C# .Net Framework 4.5 ASP.NET C#.NET Framework 2.0和3.5 - asp.net c# .net framework 2.0 and 3.5 二进制文件不是用调试信息构建的。 C# .NET 框架 4.5 - Binary was not built with debug information. C# .NET Framework 4.5 c#Covert.ToDecimal 3.5和4.5框架与XP机器的区别 - c# Covert.ToDecimal difference in the 3.5 and 4.5 framework and xp machine c#在.net 4.0应用程序中使用.net 4.5编译的dll - c# use .net 4.5 compiled dll, in a .net 4.0 application c#,带有wix的MSBuild Bootstrapper,如何下载.net framework 4.5 - c#, MSBuild Bootstrapper with wix, how to download .net framework 4.5
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM