小编Jör*_*ann的帖子

.csproj的特定于平台的ItemGroup适用于程序集引用但不包含内容?

由于我们有三个显式x86和x64版本的程序集,因此我编辑了相应的.csproj文件,例如,这样的块:

  <ItemGroup Condition=" '$(Platform)' == 'x86' ">
    <Reference Include="CaliberRMSDK">
      <HintPath>..\Libraries\CaliberRMSDK_IKVM\32bit\CaliberRMSDK.dll</HintPath>
    </Reference>
    <Content Include="..\Libraries\CaliberRMSDK_IKVM\32bit\ikvm-native.dll">
      <Link>ikvm-native.dll</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
    <Content Include="..\Libraries\CaliberRMSDK_IKVM\32bit\JVM.dll">
      <Link>JVM.dll</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <ItemGroup Condition=" '$(Platform)' == 'x64' ">
    <Reference Include="CaliberRMSDK">
      <HintPath>..\Libraries\CaliberRMSDK_IKVM\64bit\CaliberRMSDK.dll</HintPath>
    </Reference>
    <Content Include="..\Libraries\CaliberRMSDK_IKVM\64bit\ikvm-native.dll">
      <Link>ikvm-native.dll</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
    <Content Include="..\Libraries\CaliberRMSDK_IKVM\64bit\JVM.dll">
      <Link>JVM.dll</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
Run Code Online (Sandbox Code Playgroud)

在Visual Studio 2010中重新加载.csproj文件并使用"x86"作为平台时,所有工作都非常好.当选择'x64'作为平台时,使用正确的64位汇编参考但是链接的(<Content Include= ...>..)总是使用32位的(因此应用程序被破坏).

在项目文件中不再有任何CPU,我会'期望'它也适用于内容包括..但它没有.有什么我想念的吗?

.net assemblies cpu-architecture

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

ClearCase快照视图:从load语句中排除一个特定目录?

早上好,

有没有办法从快照的加载语句中只排除一个特定目录,例如我想加载一个名为' PM_CT ' 的整个视频,\PM_CT\lost + found目录除外

......有一种优雅的方式吗?我怎样才能在多个加载的vobs中排除所有丢失+找到的目录?

干杯谢谢,

-Jörg

clearcase config-spec

14
推荐指数
2
解决办法
1万
查看次数

Google Android平台已经具有财务上的吸引力?

下午好,

随着围绕着iPhone/AppStore等的所有嗡嗡声,我觉得为我已经整合的网络应用程序创建一个漂亮的iPhone应用程序是明智的,但是到目前为止你对Android平台的体验如何 - 是从销售和用户量来看它有趣吗?

我已经快速浏览了一下T-Mobile G1,从最终用户的角度来看,我认为没有什么可以吸引人的,而且对我来说似乎需要一段时间才能实现这一切.

你们中的任何人已经为该平台完成了一个或多个应用程序吗?您对此的看法如何......销售额是否低于/高于您的预期?是否值得投入时间和金钱(现在)来构建我的应用程序的Android版本?"值得"显然是一个非常灵活的术语,取决于某人的观点,但基本上现在每小时我都没有在网络应用程序上工作,基本上"有"得到相当快的回报..这就是为什么我是寻求一些真实的体验.

干杯和谢谢,-J

android

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

使用.Net ServiceInstaller在服务安装上设置"启动参数"?

我目前正在编写一个小的Windows服务应用程序,我可以通过以下方式成功地/卸载它等:

        serviceProcessInstaller = new ServiceProcessInstaller();
        serviceInstaller = new System.ServiceProcess.ServiceInstaller();
        serviceProcessInstaller.Account = ServiceAccount.LocalSystem;
        serviceInstaller.ServiceName = "ABC";
        serviceInstaller.StartType = ServiceStartMode.Automatic;
        serviceInstaller.Description = "DEF";
        Installers.AddRange(new Installer[] { serviceProcessInstaller, serviceInstaller });
Run Code Online (Sandbox Code Playgroud)

...但我显然无法在那里设置启动参数......或者我可以吗?我宁愿不继续以后修改注册表..因此问题...有什么办法我可以用编程方式设置这些参数吗?

.net installation service

9
推荐指数
3
解决办法
3万
查看次数

Asp.Net MVC - 插件目录,社区等?

我现在开始潜入asp.net mvc,我真的很喜欢我到目前为止看到的...但是我对'drop-in'功能有点困惑(类似于rails和它的插件以及现在的宝石),一个活跃的社区联系等

对于rails,github有一个massiv索引的插件/ gems /代码 - 关于大多数rails的例子(尽管他们的目标是通用源代码托管..),对于博客,邮件列表等,它也很容易找到其他开发人员的地方絮絮叨叨,但......对于asp.net mvc我有点迷路去哪看/看.这一切似乎分散在codeplex和私人网站,谷歌代码托管等等.但是有一个(或几个地方)在哪里转向关于asp.net mvc开发,示例代码等?

.net asp.net asp.net-mvc

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

与接口的代码约定:"跳过方法调用.编译器将生成方法调用,因为该方法是有条件的...... [...]"

晚上好,

我刚开始玩Microsoft.Contracts(最新版本)并将其插入到示例界面之上,现在它看起来像这样:

namespace iRMA2.Core.Interfaces
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.Composition;
    using System.Diagnostics.Contracts;

    /// <summary>
    /// Base Interface declarations for iRMA2 Extensions
    /// </summary>
    [InheritedExport]
    [ContractClass(typeof(IiRMA2ExtensionContract))]
    public interface IiRMA2Extension
    {
        /// <summary>
        /// Gets the name.
        /// </summary>
        /// <value>The name of the Extension.</value>
        string Name { get; }

        /// <summary>
        /// Gets the description.
        /// </summary>
        /// <value>The description.</value>
        string Description { get; }

        /// <summary>
        /// Gets the author of the extension. Please provide complete information to get …
Run Code Online (Sandbox Code Playgroud)

.net code-contracts

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

使用C#删除图像中的透明度

有没有人知道一个平滑/快速的方法来删除透明度,例如pngs/tiffs等,并用白色背景替换它?

基本上我需要的是我需要创建PDF/A兼容图像,根据规范,它可能具有-no-透明度(因此固定的白色背景很好).

有什么想法/建议吗?

干杯和谢谢,-Jörg

.net c# transparency image

8
推荐指数
2
解决办法
1万
查看次数

覆盖.NET通用列表<MyType> .Contains(MyTypeInstance)?

是否有可能,如果是这样我怎么重写Contains其他正常的方法List<T>,在这里T是我自己的,自定义类型?

.net c# list

7
推荐指数
2
解决办法
9659
查看次数

WPF图形布局组件

有没有人知道甚至更好..可以全心全意地推荐一个WPF图形布局组件(微软研究院有一段时间GLEE但它自2007年以来没有更新过1.0而不是WPF等),如下面的截图所示?

我见过yFiles WPFLasalle的WPF AddFlow,但还有其他选择吗?

以RedGate Ants Memory Profiler为例http://www.red-gate.com/products/ants_memory_profiler/screenshot_gallery/Class_Explorer.gif

(c)截图:RedGate Ants Memory Profiler

.net wpf layout components graph

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

TPL取消延续从未调用取消任务

我在使用TPL的代码中进行了以下设置:

  • 我班上的一个字段:private CancellationTokenSource _cancellationTokenSource;
  • 每次我创建使用该特定canceltoken的TPL任务时,此CancellationTokeSource都会被实例化

实际的TPL任务看起来像这样:

var dataRetrievalTask = new Task<List<myType>>(() =>
            {
                // retrieve data and do something
                foreach (var a in retrievalMethod())
                {
                    if (_cancellationTokenSource.Token.IsCancellationRequested)
                        _cancellationTokenSource.Token.ThrowIfCancellationRequested();

                        // do something if not cancelled
                    }
                }

                return filledListOfMyType;

            }, _cancellationTokenSource.Token);

            // define what shall happen if data retrievel finished without any problems
            var writingLoadedDataToGridTask = dataRetrievalTask.ContinueWith(task =>
            {
              // do something in case we ran to completion without error
            }, _cancellationTokenSource.Token, TaskContinuationOptions.OnlyOnRanToCompletion, currentScheduler);

            // what to do in case cancellation …
Run Code Online (Sandbox Code Playgroud)

.net multithreading task task-parallel-library

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