小编Ste*_*rew的帖子

编辑构建过程模板时,为什么工作流设计器如此极慢?

没有比上述问题更多的补充.

我有一个相当简单的构建过程模板,它几乎没有偏离默认模板.

我有两个自定义活动,通过推荐生活在同一解决方案中的单独程序集中.

然而....

打开模板大约需要两分钟.

更改工作流中活动的属性,重新排序工作流中的活动,向工作流添加活动,所有操作都需要30-60秒.

它现在完全无法使用,我开始后悔从Cruise Control转移到TFS进行构建管理:(

有没有其他人经历过这个或知道一个体面的解决方法?手动编辑XAML文本更好吗?

谢谢

build-process visual-studio-2010 workflow-foundation-4 tfs2010

9
推荐指数
1
解决办法
1559
查看次数

ControlTemplate或DataTemplate中的自定义资源字典

编辑:当使用标准.NET ResourceDictionary时也会出现此问题,并且似乎是在控件或数据模板中使用资源字典的问题.

我有一个自定义资源字典遵循共享资源实例的常见方法.

http://softnotes.wordpress.com/2011/04/05/shared-resourcedictionary-for-silverlight/ http://www.wpftutorial.net/MergedDictionaryPerformance.html

public class SharedResourceDictionary : ResourceDictionary
{
    static readonly Dictionary<Uri, WeakReference<ResourceDictionary>> SharedDictionaries = new Dictionary<Uri, WeakReference<ResourceDictionary>>();

    Uri _sourceUri;

    public new Uri Source
    {
        get
        {
            // Behave like standard resource dictionary for IDE...
            if (VisualStudio.IsInDesignMode)
                return base.Source;

            return this._sourceUri;
        }
        set
        {
            // Behave like standard resource dictionary for IDE...
            if (VisualStudio.IsInDesignMode)
            {
                base.Source = value;
                return;
            }

            this._sourceUri = value;

            WeakReference<ResourceDictionary> cached;
            if (SharedDictionaries.TryGetValue(value, out cached))
            {
                ResourceDictionary rd;
                if (cached.TryGetTarget(out rd))
                {
                    this.MergedDictionaries.Add(rd);
                    return; …
Run Code Online (Sandbox Code Playgroud)

wpf xaml datatemplate resourcedictionary controltemplate

6
推荐指数
1
解决办法
2666
查看次数

生成附属装配时警告AL1073

在Visual Studio 2010下,我在为项目生成本地化的附属程序集时收到编译器警告.我正在运行Windows 7 64位.

该项目是在x86中构建的(它必须是间接引用非托管DLL - 通过Oracle ODP.NET).

MSBuild日志生成以下警告:

(GenerateSatelliteAssemblies target) - >

ALINK:警告AL1073:引用程序集'mscorlib.dll'针对不同的处理器[xxx.csproj]

有没有办法强迫它使用与生成它的程序集相同的框架版本?

这非常令人沮丧,因为我喜欢在我们的构建中发出零警告,并且它始终存在.

.net c# localization compiler-warnings satellite-assembly

5
推荐指数
1
解决办法
2806
查看次数

如何在没有配置文件的情况下使用 Oracle Entity Framework

是否可以创建一个使用 ODP.Net 连接到现有数据库的代码优先实体框架模型,而无需在 app.config 文件中进行任何设置?

我尝试过很多不同的事情。

目前我正在设置 DbConfiguration:

    sealed class EntityFrameworkConfiguration : DbConfiguration
    {
        public static readonly DbConfiguration Instance = new EntityFrameworkConfiguration();

        EntityFrameworkConfiguration()
        {
            this.SetDefaultConnectionFactory(new OracleConnectionFactory());
            this.SetProviderServices("Oracle.ManagedDataAccess.Client", EFOracleProviderServices.Instance);
        }
    }

    DbConfiguration.SetConfiguration(EntityFrameworkConfiguration.Instance);
Run Code Online (Sandbox Code Playgroud)

我将直接传递OracleConnection到 EF 上下文中。

但是,我要么在以 SQL Server 格式生成 SQL 时遇到问题(在表别名周围使用双引号),要么收到以下错误:

An unhandled exception of type 'System.NotSupportedException' occurred in EntityFramework.dll

Additional information: Unable to determine the provider name for provider factory of type 'Oracle.ManagedDataAccess.Client.OracleClientFactory'. Make sure that the ADO.NET provider is installed or registered in the application config.
Run Code Online (Sandbox Code Playgroud)

有没有人有过在不污染 …

oracle entity-framework odp.net entity-framework-6

4
推荐指数
1
解决办法
1937
查看次数

MEF用4.5打开泛型问题

我们正在使用这样的MEF Contrib open generics支持:

[InheritedExport]
interface ITest2<T>
{
    void Execute();
}

class TestClass2<T> : ITest2<T>
{
    public void Execute()
    {
        Console.WriteLine();
    }
}

class Program
{
    static void Main(string[] args)
    {
        var catalog = new AssemblyCatalog(typeof(Program).Assembly);
        var container = new CompositionContainer(catalog);
        var test2 = container.GetExportedValues<ITest2<string>>();
    }
}
Run Code Online (Sandbox Code Playgroud)

但是,自从安装.NET Framework 4.5以来,此代码不再有效.在构建.NET 4.5或.NET 4.0之后,它不仅不再起作用,而且还破坏了现有的编译应用程序.

似乎必须在TestClass2上使用显式[Export(typeof(ITest2 <>))]属性,或者更改定义:

[InheritedExport(typeof(ITest2<>))]
interface ITest2<T>
{
    void Execute();
}
Run Code Online (Sandbox Code Playgroud)

有谁知道为什么这会改变?奇怪的是,MEF的开放式泛型支持(在4.5中)也失败了,在开放的通用接口上有一个非类型的[InheritedExport]属性.

我原以为开放通用接口上[InheritedExport]的默认行为与[InheritedExport(typeof(ITest2 <>))]相同.

谢谢,史蒂夫

.net mef .net-4.5

1
推荐指数
1
解决办法
1804
查看次数