locked
Migrated Beta Reresh App fails to compile (apparently) but still Runs?? RRS feed

  • Question

  • Hi,

     

    We've upgraded a simple application we wrote with the Beta Refresh.

    • Removed {C3FDE4A0-227C-4AFD-8D69-454B0AE35957}; from the project file.
    • Changed the Class1.cs file to start from a WorkFlow instance.
    • Fixed all code problems (removed properties etc.).

    Now when we rebuild the solution VS2005 reports that one of the two sections failed to compile.  No errors or warnings are displayed.

     

    When we deploy the application everything runs as expected.

     

    Have we failed to do something to migrate the application.  It seems bizarre that the build apparently fails but the application still runs.  We've deleted everything we believe the build process would create just in case it was an overwrite problem.

     

    The output from the build command is:

     

    ------ Rebuild All started: Project: SinkMenuApplication, Configuration: Debug Any CPU ------

    C:\windows\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig /nowarn:1701,1702 /platform:AnyCPU /warn:4 /defineBig SmileEBUG;TRACE /reference:"C:\Program Files\Microsoft Office Communications Server 2007 Speech Server\\PublicAssemblies\Microsoft.SpeechServer.dll" /reference:C:\windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\windows\Microsoft.NET\Framework\v2.0.50727\System.Design.dll /reference:C:\windows\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.Design.dll /reference:C:\windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\windows\Microsoft.NET\Framework\v2.0.50727\System.Transactions.dll /reference:C:\windows\Microsoft.NET\Framework\v2.0.50727\System.Web.dll /reference:C:\windows\Microsoft.NET\Framework\v2.0.50727\System.Web.Services.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\System.Workflow.Activities.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\System.Workflow.ComponentModel.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\System.Workflow.Runtime.dll" /reference:C:\windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /debug+ /debug:full /optimize- /outSurprisebj\Debug\SinkMenuApplication.dll /resourceSurprisebj\Debug\SinkMenuApplication.PromptStrings.resources /target:library Class1.cs Logfile.cs Properties\AssemblyInfo.cs SinkMenuApplication.cs SinkMenuApplication.designer.cs Properties\Settings.cs "C:\Documents and Settings\kjohnson\Local Settings\Temp\g7t_bnzf.cs"

    Compile complete -- 0 errors, 0 warnings

    SinkMenuApplication -> E:\Work\Projects\Code\TELEWARE ASR\MSS applications\SINKMENUAPPLICATION\SinkMenuApplication\Bin\SinkMenuApplication.dll

    ------ Rebuild All started: Project: SinkMenuApplicationPrompts, Configuration: Debug Win32 ------

    Cleaning Project SinkMenuApplicationPrompts ...

    Deleted: E:\Work\Projects\Code\TELEWARE ASR\MSS Applications\SINKMENUAPPLICATION\SinkMenuApplication\SinkMenuApplicationPrompts\Debug\SinkMenuApplicationPrompts.txt

    Deleted: E:\Work\Projects\Code\TELEWARE ASR\MSS Applications\SINKMENUAPPLICATION\SinkMenuApplication\SinkMenuApplicationPrompts\Debug\SinkMenuApplicationPrompts.WD

    Deleted: E:\Work\Projects\Code\TELEWARE ASR\MSS Applications\SINKMENUAPPLICATION\SinkMenuApplication\Prompts\SinkMenuApplicationPrompts.prompts

    Compiling Project SinkMenuApplicationPrompts ...

    BuildPrompts "E:\Work\Projects\Code\TELEWARE ASR\MSS Applications\SINKMENUAPPLICATION\SinkMenuApplication\SinkMenuApplicationPrompts\Debug\SinkMenuApplicationPrompts.txt" /out:"E:\Work\Projects\Code\TELEWARE ASR\MSS Applications\SINKMENUAPPLICATION\SinkMenuApplication\Prompts\SinkMenuApplicationPrompts.prompts" /lang:en-GB /format:ulaw /freq:8000 /norm:none

    Compiling - E:\Work\Projects\Code\TELEWARE ASR\MSS Applications\SINKMENUAPPLICATION\SinkMenuApplication\SinkMenuApplicationPrompts\Prompts.promptdb

    WARNING: Nothing to extract for prompt database.

    SinkMenuApplicationPrompts build succeeded.

    ========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

     

    We have noticed that when we create a new application the rebuild process also compiles the grammar created using the gbuilder while the old application doe snot seem to do this.  This may be the problem but I'm not sure.

     

    Any help would be appreciated.

     

    Kevin

     

    Friday, March 30, 2007 11:14 AM

Answers

  • Hi,

     

    I've sorted the problem by adding the follownig lines:

     

    <Import Project="$(MSBuildExtensionsPath)\Microsoft\Microsoft Office Communications Server 2007 Speech Server\v2.0\GrammarBuilder.Targets" />
      <Import Project="$(MSBuildExtensionsPath)\Microsoft\Microsoft Office Communications Server 2007 Speech Server\v2.0\LexiconBuilder.Targets" />

     

    into the appropriate place (ie just after the other "<Import Project=.." lines) within the project file (in my case SinkMenuApplication.csproj).

     

    Kevin

    Friday, March 30, 2007 1:17 PM

All replies

  • Hi,

     

    I've sorted the problem by adding the follownig lines:

     

    <Import Project="$(MSBuildExtensionsPath)\Microsoft\Microsoft Office Communications Server 2007 Speech Server\v2.0\GrammarBuilder.Targets" />
      <Import Project="$(MSBuildExtensionsPath)\Microsoft\Microsoft Office Communications Server 2007 Speech Server\v2.0\LexiconBuilder.Targets" />

     

    into the appropriate place (ie just after the other "<Import Project=.." lines) within the project file (in my case SinkMenuApplication.csproj).

     

    Kevin

    Friday, March 30, 2007 1:17 PM
  • Hello

    I am having a simalar problem with a migrated app. I took the steps you mentioned above and I'm getting this error: 
      Method 'Microsoft.SpeechServer.Dialog.SpeechSequentialWorkflowActivity.GetPromptResource' not found.

     

     I'm getting this error in the InitializeComponent method of my SpeechSequentialWorkflowActivity class  on this line of code:

    questionAnswerActivity2.MainPrompt.AppendText(Me.GetPromptResource("questionAnswerActivity2_MainPrompt"))

     

    I'm also not able to view the Speech Workflow in the designer. I get a big Red X along with the error metioned above.

     

    Wednesday, April 11, 2007 5:16 PM
  •  

    Hi,

     

    Are you not better running this code within the workflow class itself rather than the designer section.

     

    If you Remove the code from the InitializeComponent method and put it directly after the call to the InitializeComponent:

     

    public Workflow1()

    {

        InitializeComponent();

        questionAnswerActivity2.MainPrompt.AppendText(Me.GetPromptResource("questionAnswerActivity2_MainPrompt"))

    }

     

    Then the designer will open the workflow and everything will be initialized when a call is received.

     

    Hope this helps.

     

    Kevin

    Friday, April 13, 2007 1:20 PM
  • Dear Angel,

    Another customer encountered this issue before and Alan's reply below solved his problem.  Hope it helps you too!

    Esther Gall (MSFT)


    From: Microsoft Speech Server 2007 Beta Discussion [mailtoBig Smileiscuss@beta.mss2007.com]
    Sent: Thursday, April 12, 2007 10:00 PM
    To: Microsoft Speech Server 2007 Beta Discussion
    Subject: RE: Problem migrating Beta Refreash App to OCS Speech Server 2007

    We had a similar problem with some of our sample apps at one time.  No one remembers any longer what exactly the problem was (I’m not sure anyone ever really understood), but I do have a suggested solution.  I think the error message you are seeing is misleading.  The problem is that the code in InitializeComponent() is interpreted during compilation by Windows Workflow (this is how they build the designer representation of the project), but it is interpreted using a special-purpose limited interpreter, not the actual C#/VB .NET interpreter.  So sometimes statements which are perfectly legal .NET code don’t work as expected.  (Note that InitializeComponent() also goes through the normal build process to IL, and at runtime this code executes just like any other .NET code, and behaves normally.)

     

    Try replacing

    questionAnswerActivity2.MainPrompt.AppendText(

     

    with

    questionAnswerActivity2.Prompts.MainPrompt.AppendText(

     

    I’ve no idea why this would make a difference, but it’s what our source control system shows was done to our samples to cause them to work again.

    Sorry I couldn’t give you a more intelligent answer, but hopefully this will at least allow you to move forward.

     

    Alan Turnquist

    Developer, Speech Server

    This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, May 4, 2007 4:56 PM